sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #32965
[Bug 1464225] Re: [1.1.0] IDE: Jython: Windows: exception traceback not complete --- fixed 2015-06-15+
just tested:
- download setup
- run setup
- run testscript
the traceback is reported as expected (though in the IDE message are the
output is not broken into lines --- to be fixed)
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1464225
Title:
[1.1.0] IDE: Jython: Windows: exception traceback not complete ---
fixed 2015-06-15+
Status in Sikuli:
Fix Committed
Bug description:
Hi RaiMan.
Here is my code: http://joxi.ru/XYmEg7MiBvzyA6
______________________________________________
# coding=utf-8
import sys
from os.path import dirname
from os import putenv
from sikuli.Sikuli import getBundlePath
TEST_DIR = dirname(dirname(dirname(getBundlePath())))
ROOT_DIR = dirname(TEST_DIR)
putenv('TEST_DIR', TEST_DIR)
putenv('ROOT_DIR', ROOT_DIR)
sys.path.append(TEST_DIR)
sys.path.append(ROOT_DIR)
from Core import API, Common, Config
from TestCases.DW import DW
from TestCases.Objects import Building, Dragon, Interface
from sikuli.Sikuli import sleep
######## Local info ########
dw = DW("Breeding Cave test")
dw.bookmark = '#bookmark=kix.e5b4mg9n2ok2'
dw.set_user(Config.USERS_FB[3])
dw.admin.load(dw.user, 'Breeding')
dw.start()
____________________________________________
I specially made an error in class DW in method start(). After starting script I get trace:
[error] script [ D:\autotest\dragon_world\TestCases\Building\BreedingCave.sikuli ] stopped with error in line 27
[error] ZeroDivisionError ( integer division or modulo by zero )
Exception in thread "MainThread" java.lang.IllegalStateException: No match found
at java.util.regex.Matcher.group(Matcher.java:536)
at org.sikuli.scriptrunner.JythonScriptRunner.findErrorSourceWalkTrace(JythonScriptRunner.java:356)
at org.sikuli.scriptrunner.JythonScriptRunner.findErrorSource(JythonScriptRunner.java:321)
at org.sikuli.scriptrunner.JythonScriptRunner.runPython(JythonScriptRunner.java:226)
at org.sikuli.scriptrunner.JythonScriptRunner.runScript(JythonScriptRunner.java:183)
at org.sikuli.scriptrunner.ScriptingSupport$RunBox.run(ScriptingSupport.java:597)
at org.sikuli.scriptrunner.ScriptingSupport$RunBox.access$400(ScriptingSupport.java:513)
at org.sikuli.scriptrunner.ScriptingSupport.runscript(ScriptingSupport.java:442)
at org.sikuli.ide.SikuliIDE.run(SikuliIDE.java:206)
at org.sikuli.ide.Sikulix.main(Sikulix.java:21)
This trace shows that error caused in line 27 of my script. But this error is not in this line, it's in imported module. But trace do not show this and this is not comfortable.
In earlier versions of SIkuli trace was full and showed complete path to the error.
Also I have code:
def log_uncaught_exceptions(type, value, tb):
error("\n" + "\n".join(traceback.format_tb(tb)) + str(value))
sys.excepthook = log_uncaught_exceptions
which was getting trace and log it in my filelog.txt. Now it does not
work, because you changed something in trace output. Can I turn it off
somehow and get complete trace to the error, because this is very
uncomfortable for debugging? (Remain classic jython trace)
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1464225/+subscriptions
References