Wait not working, bug?

Asked by Ethan Perry

I know this looks like a dumb question, but I'm genuinely stumped. When the program gets to the region.wait() command, it's not finding the image. I've tried everything I can think of. I've messed with the tolerances 0.1 thru 1 and I've changed the wait time to 30 seconds (it's a 40 px image in like a 50 by 50 region). I've verified the program can find it using region.find() when the icon is already on the screen. But when it's in the waiting state, and the icon pops up, it does not find it. When it throws and error it says

[error] FindFailed ( 1696446179436.png: (78x80) seen at (1754, 687) with 1.00 in R[1683,670 223x11]

Reading the error message makes it seem to me it knows the icon is there (with 1.00 similarity!!!) but I don't know why its giving an error. This looks like a bug to me unless I'm missing something super obvious. I'm doing jython scripting on Java 8 on the latest version of sikuli.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
abuzer stream (abuzerstream) said :
#1

You say Region is 40 pixels, but as far as I understand from the error, it is a 6240 pixel image with x = 78 and y = 80.
If the Region you are searching is x=223 and y=11. The 'Y' value of the image is greater than Region.
Make sure you select the correct region with region.highlight(2).

Can you help with this problem?

Provide an answer of your own, or ask Ethan Perry for more information if necessary.

To post a message you must log in.