A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
eclipse+jython import error
Joined: Jun 01, 2009
Jul 02, 2012 04:50:24
I am getting this error
Traceback (innermost last): File "<string>", line 1, in ? ImportError: no module named mymodule at org.python.core.Py.ImportError(Unknown Source) at org.python.core.imp.import_first(Unknown Source) at org.python.core.imp.import_name(Unknown Source) at org.python.core.imp.importName(Unknown Source) at org.python.core.ImportFunction.load(Unknown Source) ..................................................................................
i have a plugin project com.myjython where there is JythonFactory.java which has the folloeing code
PythonInterpreter interpreter = new PythonInterpreter(); interpreter.exec("from com.mypackage import myFile");
I have another plugin project com.mypackage which has pysrc folder with mymodule/myFile.py
Please help me find the reason for this issue.
SCJP 6.0 86%
Joined: Sep 18, 2000
Jul 06, 2012 17:35:35
nobody else has replied, so here it goes.....
first post the code....
second, insure that is the full and complete error message... i think it is, and i think i know the issue, but i need to see the code..
third, if you have fixed this, what did you do?
Joined: Jul 02, 2008
Jul 09, 2012 06:30:25
Is com.mypackage project on the build path ?
Also, please ensure your module folder has an empty __init__.py file
I agree. Here's the link:
subject: eclipse+jython import error
How to create web service in RAD7
calling method from another package
Issue when to trying check code with pmd
Applet in JSP
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014