A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
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:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: eclipse+jython import error
Issue when to trying check code with pmd
Applet in JSP
calling method from another package
How to create web service in RAD7
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013