Error while assigning materials[Errno22]

I’m using Python and trying to assign materials to a number of Xforms that is located in a file on my nucleus server on one of it’s sublayer’s

I’m using omni.client to authenticate and open and save the file
Before implementing omni.client and redirecting my workflow to the nucleus server I have verified that i am able to access the nucleus collections, retreive the materials and bind them to the Xforms on a local file

What i’m getting now is ‘An Error occured while assigning materials[Errno22] Invalid Argument’ but it’s not indicated as an error but info in the USD Composer Console.

it could be that this is caused by a space in one of the folder names that is being replaced with %20

Any insights on this would be helpful

Yes, I would say that’s a good place to start. You don’t want to have any spaces in file names.

I feel like the solution is to have relative paths instead of full paths.

Yes that can help when moving files between places.

Well i’m trying to create and edit a file. Not move it.
I’ve successfully replaced the %20 for blank space but i’m still getting the same error.

Well then it must be your code. If you want to paste your code here, we can look at it.

This has been solved

Great to hear. If you mind sharing your solution, that would be great.

By converting the path to a format that accepts blank spaces

from urllib.parse import unquote

then wherever you get your path

my_path = unquote(my_path)

and in case we are dealing with a local path we might also need to change any \ to / as well using .replace

creating one variable for this and then populating it across the scripts i think is preferrable. Then you only need to do this once.

Great thanks. A clever solution.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.