Module Not Found Error

Module Not Found Error

alvaro.programs
Participant Participant
5,303 Views
1 Reply
Message 1 of 2

Module Not Found Error

alvaro.programs
Participant
Participant

Hi there. 

 

I'm trying to load a simple renamer script using python in Maya 2022, but I'm having this "Module Not Found Error".

 

My script file location is : C:\Users\alvar\Documents\maya\2022\scripts\practice

 

should I add this location somewhere or somehow? It looks like Maya is not finding it. 

 

Looking forward to your support. 

 

Thanks in advance. gJYOegOxXo.png

 

 

0 Likes
5,304 Views
1 Reply
Reply (1)
Message 2 of 2

Kahylan
Advisor
Advisor

Hi!

 

In order to have your scripts in a custom folder, you have to set that folder using sys.paths.append

 

Here's a tutorial on how to do it:

 

https://subscription.packtpub.com/book/business/9781785283987/1/ch01lvl1sec15/adding-custom-folders-...

 

You'll need to do this for every new Maya Version again, so it is handy to somewhere store a script that adds your additional scripts folders if you do a lot of scripting.

 

I hope this helps!