Sikuli quits on "if" without error message

Asked by stephane

I've written a small script to play a game, but it quits without giving me any error message.

I was able to track the problem down to two lines, sometimes it breaks on this line:

if myRegion.inside().exists(Pattern(image).similar(similarity),0):

and sometimes on this line:

while myRegion.inside().exists(Pattern(image2).similar(similarity),0):

(when I put a print command before and after these conditions, I only get the output from the first one)

Note that I've been building my script gradually, and before I started adding "click" commands, I think I didn't get these errors (I think).

I'm running Sikuli 1.1.0 from the command line on Windows.

Any idea what it might be?
Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
stephane
Solved:
Last query:
Last reply:
Revision history for this message
stephane (su1) said :
#1

ok it was actually a typo in myRegion that I missed. For some reason Sikuli didn't return any error message, and then, all of a sudden, an error message!