← Back to team overview

sikuli-driver team mailing list archive

[Question #253906]: debugging Sikuli in Pycharm

 

New question #253906 on Sikuli:
https://answers.launchpad.net/sikuli/+question/253906

Hi all,

I'm using Sikuli 1.0.1 on Windows7 with Java7 and Pycharm as IDE for debugging.
For that I :
- installed jython2.5.3 and used it as Pycharm Jython interpreter
- extracted from sikuli-ide.jar the folder Lib\sikuli and added it to the sys.path.
- added the C:/apps/SikuliX/sikuli-ide.jar to the CLASSPATH env variable

Thanks to that, I could run successfully some Sikuli scripts like this :

from sikuli import *
result = find("myImage.png")
result.highlight(3)

Now, I wanted to use the Pycharm debug but, for the same script, I got the following error :

Traceback (most recent call last):
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pydev\pydevd.py", line 1733, in <module>
    debugger.run(setup['file'], None, None)
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pydev\pydevd.py", line 1226, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:/Users/fabio_iervolino/PycharmProjects/test2/test.py", line 19, in <module>
    from sikuli import *
  File "C:\jython2.5.3\Lib\site-packages\sikuli-ide\Lib\sikuli\__init__.py", line 7, in <module>
    from Sikuli import *
  File "C:\jython2.5.3\Lib\site-packages\sikuli-ide\Lib\sikuli\Sikuli.py", line 10, in <module>
    import __main__
ImportError: No module named __main__


No Idea of what this module __main__ is ....
The problem raises when I execute the "from sikuli import *" in debugging => I guess it is not a generic debug problem but something to do with the Sikuli import.

Could someone help me please ?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.