ImportError: No module named org.sikuli.basics

Asked by Flashed

Hi,

I'm using Jython 2.5.3, PyDev, Sikuli 1.0.1 and Eclipse Luna on Mac OS X.
After I added the Python-Path enviroment variables and the PyDev external libraries with Sikuli itself everything is working fine.
Also the PyModel samples are working on my mashine.

Now I want to combine Sikuli with PyModel testing(http://staff.washington.edu/jon/pymodel/www/).
But when I try to execute the a simple Sikuli test with PyModel I get the following message:

('', 'Traceback (most recent call last):
  File "/usr/local/bin/pmt", line 8, in <module>
    pmt.main()
  File "/Library/Python/2.7/site-packages/pymodel/pmt.py", line 180, in main
    mp = ProductModelProgram(options, args)
  File "/Library/Python/2.7/site-packages/pymodel/ProductModelProgram.py", line 40, in __init__
    self.module[mname] = __import__(mname)
  File "/Volumes/MBT_Py/PyModel/samples/handshake/handshake.py", line 8, in <module>
    from sikuli.Sikuli import *
  File "/Volumes//MBT_Py/sikuli/__init__.py", line 5, in <module>
    from org.sikuli.basics import Debug
ImportError: No module named org.sikuli.basics
')

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1
Revision history for this message
Flashed (robert-andreas-kanzler) said :
#2

Thank you for your fast answer!

I cannot find the sikulixapi.jar to add it to my java classpath of the project.

I have changed the Sikuli import to :
"import org.sikuli.basics.SikulixForJython
from sikuli import *"
Eclipse is able to locate the org.sikuli.basics.SikulixForJython inside the sikuli-java.jar
So like before normal Sikuli scripts are running.

But the PyModel test is still not running. Now the error Message says: "('[...] import org.sikuli.basics.SikuliXforJython
ImportError: No module named org.sikuli.basics.SikuliXforJython')

Do you have any ideas?

Revision history for this message
RaiMan (raimund-hocke) said :
#3

nickname Flashed: LOL - sorry, aber die Blitze haben dir wohl die Sicht versperrt ;-)
Am Anfang steht, dass die Besonderheiten für Version 1.0.1 am Ende stehen.
Manchmal bin ich wirklich ratlos wie und was ich noch schreiben soll.
Sorry, aber musste mal raus. Möge der Blitz mich treffen.

Your problem:
Might be, that PyModel (never heard of it before) sets up it's own environment, or does not inherit from Eclipse project at runtime.
You have to check that some how by debug printing the relevant lists like class path and sys.path in you PyModel at runtime or looking into the docs.
With Eclipse I know, that there is some option to switch on/off environment inheritance at runtime of projects.

Revision history for this message
Flashed (robert-andreas-kanzler) said :
#4

Bei dem guten Wetter hier in Hessen hoffe ich, dass uns die Blitze noch ein paar Tage erspart bleiben :P

Thank you for the tip with the own eclipse environment. I didn't now that. If I find a solution I will post it here.

Can you help with this problem?

Provide an answer of your own, or ask Flashed for more information if necessary.

To post a message you must log in.