sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #57816
Re: [Question #699550]: Lib Traceback returno NullPointer
Question #699550 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/699550
Status: Answered => Open
Patrick Geovani Francisconi Zerbinatti is still having a problem:
Sorry, I didn't found a option to add in the attachment the traceback.
But while I was codoing a sample snippet to explain better the problem,
I found more clues about it.
In the Sikuli IDE I wrote the code:
import traceback
try:
teste = 10/0
except:
print(traceback.format_exc())
When I click on the button "Run" its work fine, returning the traceback
about the division by zero. But when I use the option on "File" "Export
as runnable jar" and try to execute the .jar from CMD it returns the
java.lang.NullPointerException.
This is the full error:
Exception in thread "MainThread" Traceback (most recent call last):
File "__pyclasspath__/__run__$py.class", line 4, in <module>
File "__pyclasspath__/testeteste$py.class", line 7, in <module>
File "C:\Users\pzerbinarri\Desktop\testeteste_sikuli.jar\Lib\traceback.py", line 241, in format_exc
File "C:\Users\pzerbinarri\Desktop\testeteste_sikuli.jar\Lib\traceback.py", line 141, in format_exception
File "C:\Users\pzerbinarri\Desktop\testeteste_sikuli.jar\Lib\traceback.py", line 76, in format_tb
File "C:\Users\pzerbinarri\Desktop\testeteste_sikuli.jar\Lib\traceback.py", line 101, in extract_tb
File "C:\Users\pzerbinarri\Desktop\testeteste_sikuli.jar\Lib\linecache.py", line 14, in getline
File "C:\Users\pzerbinarri\Desktop\testeteste_sikuli.jar\Lib\linecache.py", line 40, in getlines
File "C:\Users\pzerbinarri\Desktop\testeteste_sikuli.jar\Lib\linecache.py", line 92, in updatecache
File "C:\Users\pzerbinarri\Desktop\testeteste_sikuli.jar\Lib\linecache.py", line 92, in updatecache
java.lang.NullPointerException
at org.python.core.ClasspathPyImporter$1.close(ClasspathPyImporter.java:186)
at org.python.core.ClasspathPyImporter.ClasspathPyImporter_get_source(ClasspathPyImporter.java:116)
at org.python.core.ClasspathPyImporter$ClasspathPyImporter_get_source_exposer.__call__(Unknown Source)
at org.python.core.PyObject.__call__(PyObject.java:484)
at linecache$py.updatecache$5(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/linecache.py:135)
at linecache$py.call_function(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/linecache.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:154)
at org.python.core.PyFunction.__call__(PyFunction.java:423)
at linecache$py.getlines$3(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/linecache.py:40)
at linecache$py.call_function(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/linecache.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:154)
at org.python.core.PyFunction.__call__(PyFunction.java:423)
at linecache$py.getline$1(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/linecache.py:18)
at linecache$py.call_function(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/linecache.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:171)
at org.python.core.PyFunction.__call__(PyFunction.java:434)
at traceback$py.extract_tb$6(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/traceback.py:107)
at traceback$py.call_function(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/traceback.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:154)
at org.python.core.PyFunction.__call__(PyFunction.java:423)
at traceback$py.format_tb$5(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/traceback.py:76)
at traceback$py.call_function(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/traceback.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:154)
at org.python.core.PyFunction.__call__(PyFunction.java:423)
at traceback$py.format_exception$8(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/traceback.py:145)
at traceback$py.call_function(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/traceback.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:189)
at org.python.core.PyFunction.__call__(PyFunction.java:446)
at traceback$py.format_exc$14(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/traceback.py:243)
at traceback$py.call_function(C:/Users/pzerbinarri/Desktop/testeteste_sikuli.jar/Lib/traceback.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
at org.python.core.PyBaseCode.call(PyBaseCode.java:119)
at org.python.core.PyFunction.__call__(PyFunction.java:403)
at testeteste$py.f$0(C:/Users/pzerbinarri/AppData/Roaming/Sikulix/SetupStuff/scriptCompiled/testeteste.py:7)
at testeteste$py.call_function(C:/Users/pzerbinarri/AppData/Roaming/Sikulix/SetupStuff/scriptCompiled/testeteste.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.util.importer.importer_load_module(importer.java:116)
at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:170)
at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)
at org.python.core.imp.loadFromLoader(imp.java:593)
at org.python.core.imp.find_module(imp.java:547)
at org.python.core.imp.import_next(imp.java:838)
at org.python.core.imp.import_module_level(imp.java:957)
at org.python.core.imp.importName(imp.java:1057)
at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
at org.python.core.PyObject.__call__(PyObject.java:450)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importOne(imp.java:1076)
at __run__$py.f$0(C:/Users/pzerbinarri/AppData/Roaming/Sikulix/SetupStuff/scriptCompiled/__run__.py:4)
at __run__$py.call_function(C:/Users/pzerbinarri/AppData/Roaming/Sikulix/SetupStuff/scriptCompiled/__run__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.util.importer.importer_load_module(importer.java:116)
at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:170)
at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)
at org.python.core.imp.loadFromLoader(imp.java:593)
at org.python.core.imp.find_module(imp.java:547)
at org.python.core.imp.import_next(imp.java:838)
at org.python.core.imp.import_first(imp.java:863)
at org.python.core.imp.load(imp.java:721)
at org.python.util.JarRunner.run(JarRunner.java:27)
at org.python.util.JarRunner.main(JarRunner.java:31)
java.lang.NullPointerException: java.lang.NullPointerException
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.