Message 1 of 1
Maya output window reports import error from userSetup.py even though its empty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I had the following in my userSetup.py file to build a custom shelf at startup:
import maya.cmds as mc
import shelfMake
mc.evalDeferred("shelfMake.customShelf()")
it fails to execute because I had the import statement wrong:
Failed to execute userSetup.py
Traceback (most recent call last):
File "C:/Users/-----/Documents/maya/2019/scripts\userSetup.py", line 2, in <module>
import shelfMake
So I fixed it, the following works if i run it from the script editor:
import maya.cmds as mc
import Pipeman.src.shelfMake as shelfMake
mc.evalDeferred("shelfMake.customShelf()")
But it still failed with the same error. I figured it was something stuck in memory so I rebooted my machine, it still failed. So I deleted everything inside the userSetup.py file and it still fails saying it can't find the module. If i remove the file entirely then it obviously doesn't show the error since there's no file to execute.
I'm baffled as to what is happening here and hoping someone could help me figure it out.