sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #28482
Re: [Question #255035]: I can't get 1.1.0 nightly sikulixapi working within PyCharm
Question #255035 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/255035
Description changed to:
I'm trying to use PyCharm for the latest build of 1.1.0. I've got a
small program which highlights an area of the screen which executes
properly in the Sikuli IDE. (I'm only dumping the environment, path,
etc for debugging purposes)
import os
import sys
cwd = os.getcwd()
if cwd:
print "cwd: %s" % (cwd)
print "env:"
for e in os.environ:
print "\t%s=%s" % (e, os.environ[e])
if not cwd in sys.path:
sys.path.insert(1, cwd)
print "added path: %s" % (cwd)
_SX_DIR = r'c:\users\pierreb\downloads\sx110-140925'
print "sys.path: [\n\t%s\n]" % ("\n\t".join(["{0}".format(dir_path) for dir_path in sys.path if dir_path]))
from java.lang import ClassLoader
cl = ClassLoader.getSystemClassLoader()
class_path = map(lambda url: url.getFile(), cl.getURLs())
print "classpath: %s" % class_path
from sikuli import Screen
from sikuli import Region
if __name__ == '__main__':
import org.sikuli.script.SikulixForJython
r = Region(200,200,300,300)
r.highlight(5)
When I run it in PyCharm it fails with the following error. Any help
would be appreciated
… more
JYTHONPATH=C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pydev;C:\Users\pierreb\Downloads\sx110-140925\sikulixapi.jar; …
.. more
classpath: [u'/C:/Apps/jython/2.7b3/jython.jar']
[debug] Jython: sikuli: Sikuli: starting init
[debug] ResourceLoader: SikuliX Package Build: 1.1.0 2014-09-25_09:10nightly
[error] ResourceLoader: ...: Fatal Error 101: Not possible to access the jar files!
[error] ***** Terminating SikuliX after a fatal error 101 *****
It makes no sense to continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.
[debug] Sikulix: cleanUp: 0
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/pierreb/PycharmProjects/first/pp/simple.py", line 25, in <module>
from sikuli import Screen
File "c:\users\pierreb\downloads\sx110-140925\Lib\sikuli\__init__.py", line 6, in <module>
from Sikuli import *
File "c:\users\pierreb\downloads\sx110-140925\Lib\sikuli\Sikuli.py", line 30, in <module>
from org.sikuli.script import Screen as JScreen
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:340)
… more
java.lang.ExceptionInInitializerError:
java.lang.ExceptionInInitializerError
Process finished with exit code -1
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.