sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #49436
[Bug 1804875] Re: [1.1.4] Region: findWord/findLine crash if nothing is found --- fixed 2018-11-24 build 131
thanks for the good problem description
** Summary changed:
- .findWord raises exception in case nothing is found
+ [1.1.4] Region: findWord/findLine crash if nothing is found --- fixed 2018-11-24 build 131
** Changed in: sikuli
Status: New => Fix Committed
** Changed in: sikuli
Importance: Undecided => Critical
** Changed in: sikuli
Assignee: (unassigned) => RaiMan (raimund-hocke)
** Changed in: sikuli
Milestone: None => 1.1.4
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1804875
Title:
[1.1.4] Region: findWord/findLine crash if nothing is found --- fixed
2018-11-24 build 131
Status in Sikuli:
Fix Committed
Bug description:
following code will raise an exception in case the word is not found,
all is fine in case the word is here:
areaLeft.setThrowException(False)
for i in range(1,25):
match=areaLeft.findWord(str(i))
if match!=None:
match.highlight(1)
thats the error:
[error] script [ TWD ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\temp\SikuliX\TWD.sikuli\TWD.py", line 2102, in <module> runStats() File "C:\temp\SikuliX\TWD.sikuli\TWD.py", line 1043, in runStats match=areaLeft.findWord(str(i)) at org.sikuli.script.Region.findWord(Region.java:2736)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
java.lang.ClassCastException: java.lang.ClassCastException: org.sikuli.script.Finder cannot be cast to org.sikuli.script.Match
system is Windows 10, SikulixIDE 1.1.4
others:
*) findText does not throw exception, but does only find 10% of the text
*) try: except: results into the same issue
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1804875/+subscriptions
References