"+ New File" Maya action error

Hi everyone,

I started to create a new special pipeline configuration for freelancers. Those people, don’t have access to our network, so I created a new root name and pointed it to C:\VetorZero\work. The production pipeline configuration has the roots paths pointed to our file server.

When I try to create a new file with tk-multi-workfiles on Maya, It raises the following error:

Failed to change work area - Error during execution of MEL script: file: C:/Program files/Autodesk/Maya2019/scripts/others/setProject.mel line 332: New project location C:\VetorZero\work\Shotgun-workflow_completo\sequences\Seq_001\SH_010\ANIM\maya is not a valid directory, project not created.
Calling Procedure: setProject, in file “C:\Program Files\Shotgun\c” set project(“C:\Vetorzero\work\SHOTGUN-workflow_completo\sequences\Seq_001\SH_010\ANIM\maya”)

I realized that it created the folder C:\Vetorzero\work\SHOTGUN-workflow_completo\sequences\Seq_001\SH_010\ANIM, but it isn’t created the folder “maya” on the folder “ANIM”, so because it, that raise this error.

I was debugging the code and realized that file_action.py realized that, by context, that needed to create the “maya” directory, but the function FileAction.create_folders (ctx) created only up to the folder ANIM, as the following images show.

error.zip (1.4 MB)

After this error, if I try to create a new file again, that doesn’t result in any error, because the Shotgun was set the task context assuming that all folders have already been created, but those weren’t.

Have any of you ever had a similar error? What can I do to solve or help to solve that?



Hey, guys, how are you?

Did anyone have any ideas that could help me, please?

Thank you!

Hi @gvalderramos,

If the issue is only that the static directory i.e maya is not getting created, you could try:

from sgtk.util.filesystem import ensure_folder_exists

Personally we run register_folders beforehand on all task entities though, which might be why we are able to get away with using ensure_folder_exists but ymmv.

Hope this helps!

Please could you attach your schema to this thread so we can take a look at what is going on here?

In the default setup, the maya folder is a static folder as @Sreenathan_Nair mentions that has deferred creation until folder creation is run inside Maya.

Hi @philip.scadding and @Sreenathan_Nair,

Thank you for all, I’ve checked the schema again and you are right, the folder “maya” was deleted by mistake. After that, I’ve tested again and this worked!



Happy that you solved it buddy!

1 Like