Previous Thread  Next Thread

chat icon Module not found error

xvoodoo

Posted: Mon Feb 10, 2003 10:41 am
Joined: 22 Dec 2002
Posts: 5
Hi I'm new in python scripting. And I have a little problem. I have two script files loaded in text window - for example file1.py and file2.py. And if I write in file1.py this:

from file2 import *

I got an error - Module 'file2' not found

What should I do? Or what should I set and where?
Question
Thanx for help
Reply with quote


xvoodoo

Posted: Fri Feb 14, 2003 11:05 am
Joined: 22 Dec 2002
Posts: 5
Exclamation hey, is anyone reading this formum? Did somebody already read my message? Does somebody care about my problem? Question
Reply with quote


Coz

Posted: Fri Feb 14, 2003 5:11 pm
Joined: 16 Oct 2002
Posts: 46
I don't know much about python, and maybe the ones that know in this forum don't know how to help you. Ask for help in www.elysiun.com

EDITED: I think you are trying to import a file in the wrong way. In a python script I saw this:

import Blender
from Blender.Draw import *

So I guess python thinks you are trying to import a function not a file. Try the first, but as you can see, I'm just guessing.
Reply with quote


xvoodoo

Posted: Sun Feb 23, 2003 9:30 am
Joined: 22 Dec 2002
Posts: 5
Thax for help, but that's not it. Maybe I try ellysium.
Reply with quote


willian

Posted: Sun Feb 23, 2003 9:50 pm
Joined: 13 Jan 2003
Posts: 20
xvoodoo wrote:
Hi I'm new in python scripting. And I have a little problem. I have two script files loaded in text window - for example file1.py and file2.py. And if I write in file1.py this:

from file2 import *

I got an error - Module 'file2' not found

What should I do? Or what should I set and where?
Question
Thanx for help


Hi Smile

As far as I know, loading both scripts is not the right way. If you want to import file2 in file1, file2 must be in the PYTHONPATH: like other python modules, it must be in one of the folders where the python interpreter will look for it. This link at elysiun should tell you how to solve the matter:

http://www.elysiun.com/forum/viewtopic.php?t=7723

Have fun.
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group