Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.
2011-10-04 09:59:18|   2.3|  0.1|FATAL |PythonFactory failed to load python symbol `module2.py'
2011-10-04 09:59:18|   2.3|  0.0|FATAL |Factory proxy not initialized
2011-10-04 09:59:18|   2.3|  0.0|FATAL |PythonFactory failed to process feature
2011-10-04 09:59:18|   2.3|  0.0|FATAL |PythonFactory failed to process feature
2011-10-04 09:59:18|   2.3|  0.0|ERROR |BADNEWS: A fatal error has occurred. Check the logfile above for details (.\dynafact.cpp:305)

So It does not work, cannot read python script. What could be a problem?!? I have saved my python script in the directory where is my workbench.

Thanks

share|improve this question
3  
Looks like it's having trouble finding 'module2.py'...is that being called from your code in your PythonCaller? – Chad Cooper Oct 4 '11 at 12:12
Nope. I tried to call it from Startup Python Script. – Z77 Oct 7 '11 at 10:55
let's see the code, please. – Chad Cooper Oct 7 '11 at 11:47
I am sorry, I have done so much modifactions that I do not have origin code now:) I am trying to do now something else and have problems again etc...ufff. My head hurts. – Z77 Oct 7 '11 at 13:54
Is it possible to send you and email or explain you whole problem?! – Z77 Oct 7 '11 at 13:55
show 1 more comment

1 Answer

I think the problem is knowing the path python looks in to find scripts. Within FME this can be confusing. A solutions for you might be to add the path to your script in the code like this:

import sys
sys.path.append("c:\\MyPath\")
import module2.py

You can see the python path (where it is looking for scripts) by adding this to your script

import sys
from pprint import pprint as p
p(sys.path)

For other solutions to dealing with the python path, this is a good article.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.