sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #49431
[Bug 1804875] [NEW] .findWord raises exception in case nothing is found
Public bug reported:
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
** Affects: sikuli
Importance: Undecided
Status: New
--
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:
.findWord raises exception in case nothing is found
Status in Sikuli:
New
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
Follow ups