sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #24827
[Question #245672]: [1.0.1] NullPointerException when run compiled jython code
New question #245672 on Sikuli:
https://answers.launchpad.net/sikuli/+question/245672
Hi, all.
I write some sikuli script in jython. And it works OK under Eclipse. But when I compile the jython script to *.class, and run it on command line, a NullPointerException raises.
Environment: win7 64, sikilu 1.0.1
Run: java -cp jython-standalone-2.7-b1.jar;sikuli-java.jar;. myapp$py
Error:
Mar 18, 2014 6:47:37 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Exception in thread "MainThread" Traceback (most recent call last):
File "myapp$py", line 35, in <module>
File "__pyclasspath__/mylib$py.class", line 8, in <module>
File "C:\Users\user00\projects\myapp\release\sikuli-java.jar\Lib\sikuli\__init_
_.py", line 7, in <module>
File "C:\Users\user00\projects\myapp\release\sikuli-java.jar\Lib\sikuli\Sikuli.
py", line 25, in <module>
File "C:\Users\user00\projects\myapp\release\sikuli-java.jar\Lib\sikuli\Region.
py", line 10, in <module>
File "C:\Users\user00\projects\myapp\release\jython-standalone-2.7-b1.jar\Lib\i
nspect.py", line 35, in <module>
File "C:\Users\user00\projects\myapp\release\jython-standalone-2.7-b1.jar\Lib\s
tring.py", line 124, in <module>
File "C:\Users\user00\projects\myapp\release\jython-standalone-2.7-b1.jar\Lib\s
tring.py", line 117, in __init__
File "C:\Users\user00\projects\myapp\release\jython-standalone-2.7-b1.jar\Lib\r
e.py", line 213, in escape
java.lang.NullPointerException
at org.python.core.PyObject._add(PyObject.java:2047)
at re$py.escape$11(C:\Users\user00\projects\myapp\release\jython-standalo
ne-2.7-b1.jar\Lib\re.py:214)
at re$py.call_function(C:\Users\user00\projects\myapp\release\jython-stan
dalone-2.7-b1.jar\Lib\re.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:134)
at org.python.core.PyFunction.__call__(PyFunction.java:347)
at string$py.__init__$8(C:\Users\user00\projects\myapp\release\jython-sta
ndalone-2.7-b1.jar\Lib\string.py:121)
at string$py.call_function(C:\Users\user00\projects\myapp\release\jython-
standalone-2.7-b1.jar\Lib\string.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
at org.python.core.PyFunction.__call__(PyFunction.java:417)
at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:232)
at org.python.core.PyMethod.__call__(PyMethod.java:223)
at org.python.core.PyMethod.__call__(PyMethod.java:218)
at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
at org.python.core.PyTypeDerived.dispatch__init__(PyTypeDerived.java:104
1)
at org.python.core.PyType.type___call__(PyType.java:1645)
at org.python.core.PyType.__call__(PyType.java:1628)
at org.python.core.PyObject.__call__(PyObject.java:438)
at org.python.core.Py.makeClass(Py.java:1680)
at org.python.core.Py.makeClass(Py.java:1641)
at org.python.core.Py.makeClass(Py.java:1633)
at string$py.f$0(C:\Users\user00\projects\myapp\release\jython-standalone
-2.7-b1.jar\Lib\string.py:543)
at string$py.call_function(C:\Users\user00\projects\myapp\release\jython-
standalone-2.7-b1.jar\Lib\string.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:393)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipi
mporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_expo
ser.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.
java:47)
at org.python.core.imp.loadFromLoader(imp.java:520)
at org.python.core.imp.find_module(imp.java:474)
at org.python.core.imp.import_next(imp.java:737)
at org.python.core.imp.import_module_level(imp.java:846)
at org.python.core.imp.importName(imp.java:936)
at org.python.core.ImportFunction.__call__(__builtin__.java:1278)
at org.python.core.PyObject.__call__(PyObject.java:373)
at org.python.core.__builtin__.__import__(__builtin__.java:1231)
at org.python.core.imp.importOne(imp.java:955)
at inspect$py.f$0(C:\Users\user00\projects\myapp\release\jython-standalon
e-2.7-b1.jar\Lib\inspect.py:965)
at inspect$py.call_function(C:\Users\user00\projects\myapp\release\jython
-standalone-2.7-b1.jar\Lib\inspect.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:393)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipi
mporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_expo
ser.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.
java:47)
at org.python.core.imp.loadFromLoader(imp.java:520)
at org.python.core.imp.find_module(imp.java:474)
at org.python.core.imp.import_next(imp.java:737)
at org.python.core.imp.import_first(imp.java:767)
at org.python.core.imp.import_module_level(imp.java:856)
at org.python.core.imp.importName(imp.java:936)
at org.python.core.ImportFunction.__call__(__builtin__.java:1278)
at org.python.core.PyObject.__call__(PyObject.java:373)
at org.python.core.__builtin__.__import__(__builtin__.java:1231)
at org.python.core.imp.importOne(imp.java:955)
at sikuli.Region$py.f$0(C:\Users\user00\projects\myapp\release\sikuli-jav
a.jar\Lib\sikuli\Region.py:14)
at sikuli.Region$py.call_function(C:\Users\user00\projects\myapp\release\
sikuli-java.jar\Lib\sikuli\Region.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:393)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipi
mporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_expo
ser.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.
java:47)
at org.python.core.imp.loadFromLoader(imp.java:520)
at org.python.core.imp.find_module(imp.java:474)
at org.python.core.PyModule.impAttr(PyModule.java:101)
at org.python.core.imp.import_next(imp.java:739)
at org.python.core.imp.import_module_level(imp.java:846)
at org.python.core.imp.importName(imp.java:936)
at org.python.core.ImportFunction.__call__(__builtin__.java:1278)
at org.python.core.PyObject.__call__(PyObject.java:373)
at org.python.core.__builtin__.__import__(__builtin__.java:1231)
at org.python.core.imp.importAll(imp.java:1056)
at sikuli.Sikuli$py.f$0(C:\Users\user00\projects\myapp\release\sikuli-jav
a.jar\Lib\sikuli\Sikuli.py:287)
at sikuli.Sikuli$py.call_function(C:\Users\user00\projects\myapp\release\
sikuli-java.jar\Lib\sikuli\Sikuli.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:393)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipi
mporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_expo
ser.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.
java:47)
at org.python.core.imp.loadFromLoader(imp.java:520)
at org.python.core.imp.find_module(imp.java:474)
at org.python.core.PyModule.impAttr(PyModule.java:101)
at org.python.core.imp.import_next(imp.java:739)
at org.python.core.imp.import_module_level(imp.java:846)
at org.python.core.imp.importName(imp.java:936)
at org.python.core.ImportFunction.__call__(__builtin__.java:1278)
at org.python.core.PyObject.__call__(PyObject.java:373)
at org.python.core.__builtin__.__import__(__builtin__.java:1231)
at org.python.core.imp.importAll(imp.java:1056)
at sikuli$py.f$0(C:\Users\user00\projects\myapp\release\sikuli-java.jar\L
ib\sikuli\__init__.py:7)
at sikuli$py.call_function(C:\Users\user00\projects\myapp\release\sikuli-
java.jar\Lib\sikuli\__init__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:393)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipi
mporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_expo
ser.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.
java:47)
at org.python.core.imp.loadFromLoader(imp.java:520)
at org.python.core.imp.find_module(imp.java:474)
at org.python.core.imp.import_next(imp.java:737)
at org.python.core.imp.import_module_level(imp.java:846)
at org.python.core.imp.importName(imp.java:936)
at org.python.core.ImportFunction.__call__(__builtin__.java:1278)
at org.python.core.PyObject.__call__(PyObject.java:373)
at org.python.core.__builtin__.__import__(__builtin__.java:1231)
at org.python.core.imp.importAll(imp.java:1056)
at mylib$py.f$0(C:\Users\user00\projects\myapp\src\mylib.py:353)
at mylib$py.call_function(C:\Users\user00\projects\myapp\src\libwecha
t.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:393)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(C
lasspathPyImporter.java:63)
at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_e
xposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.
java:47)
at org.python.core.imp.loadFromLoader(imp.java:520)
at org.python.core.imp.find_module(imp.java:474)
at org.python.core.imp.import_next(imp.java:737)
at org.python.core.imp.import_module_level(imp.java:846)
at org.python.core.imp.importName(imp.java:936)
at org.python.core.ImportFunction.__call__(__builtin__.java:1278)
at org.python.core.PyObject.__call__(PyObject.java:373)
at org.python.core.__builtin__.__import__(__builtin__.java:1231)
at org.python.core.imp.importOne(imp.java:955)
at myapp$py.f$0(C:\Users\user00\projects\myapp\src\myapp.py:489)
at myapp$py.call_function(C:\Users\user00\projects\myapp\src\myapp.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:393)
at org.python.core.imp.createFromCode(imp.java:364)
at org.python.core.Py.runMain(Py.java:984)
at myapp$py.main(C:\Users\user00\projects\myapp\src\myapp.py)
java.lang.NullPointerException: java.lang.NullPointerException
Thanks!
ashi
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.