sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #40844
Re: [Question #404001]: [1.1.0+] HowTo use Region.observe()
Question #404001 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/404001
Description changed to:
usage is correct - problem fixed with 1.1.1 nightly 2016-11-29
-----------------------------------------------------------------
I don't understand, why this code hangs up (I use latest 1.1.1 nightly
version).
def myhandler(event):
print "Seen"
event.stopObserver()
img = "a.png"
reg = Region(417,895,209,185)
reg.onAppear(img, myhandler)
reg.observeInBackground(1)
reg.stopObserver()
# img is on the screen, so myhandler should immediately run and print "Seen". But I see the following:
--------------------------
Exception in thread "Thread-11" Traceback (most recent call last):
File "C:\SikuliX\SikuliX 1.1.1 Nov 07\sikulix.jar\Lib\sikuli\Region.py", line 63, in observe
...
File "C:\SikuliX\SikuliX 1.1.1 Nov 07\sikulix.jar\Lib\sikuli\Region.py", line 63, in observe
...
...
RuntimeError: maximum recursion depth exceeded (Java StackOverflowError)
--------------------------
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.