sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #30350
[Question #261426]: Region.observe(60, True) is throwing an exception
New question #261426 on Sikuli:
https://answers.launchpad.net/sikuli/+question/261426
Sikuli 1.1.0
I'm trying to track the sub-menu that appears when you click on a menu name. I've set up the handler and assigned it with onChange() but when I call r.observe(60, True) an exception is thrown. Printing the exception type and message gives the following information:
<type 'exceptions.TypeError'>, observe(): expected 0-1 args; got 2
I need the observe() to run in the background as the script will also be generating the click so calling observe(60) won't work.
Here's the complete log
===================
C:\git\AlphaPack2\jython\2.7b3\jython.bat -Dsikuli.Debug=3 "-Dpython.path=C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs;C:\Users\pierreb\PycharmProjects\detect_region\sikuli\sikulixapi.jar;C:\Users\pierreb\PycharmProjects\detect_region\sikuli\Lib;C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0\helpers\pycharm;C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0\helpers\pydev;C:\Users\pierreb\PycharmProjects\detect_region\dr" "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 51740 --file C:/Users/pierreb/PycharmProjects/detect_region/dr/main.py
Failed to get import name for name _codecs.class
pydev debugger: process 6544 is connecting
Failed to get import name for name thread.class
Failed to get import name for name _codecs.class
Connected to pydev debugger (build 139.1001)
Jan 30, 2015 11:45:39 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[debug] SikuliXforJython: sys.path[0]: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs
[debug] SikuliXforJython: sys.path[1]: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\sikulixapi.jar
[debug] SikuliXforJython: sys.path[2]: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\Lib
[error] Sikuli Jython API already on sys.path, but not at sikulixapi.jar/Lib
[error] Found here: C:/Users/pierreb/PycharmProjects/detect_region/sikuli/Lib/
[debug] Jython: sikuli: Sikuli: starting init
Failed to get import name for name FindFailedResponse.class
Failed to get import name for name FindFailedResponse.declaringClass
Failed to get import name for name Constants.class
Failed to get import name for name Constants.class
[debug] ResourceLoader: SikuliX Package Build: 1.1.0 2015-01-16_01:00nightly
[debug] ResourceLoader: check: we are running on arch: amd64
[debug] ResourceLoader: check: using Java at: C:/Program Files/Java/jre1.8.0_20/
[debug] ResourceLoader: check: Exists libs folder at location of jar? YES: C:/Users/pierreb/PycharmProjects/detect_region/sikuli/
[debug] ResourceLoader: checkLibsDir: trying: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs
[debug] ResourceLoader: checkLibsDir: Running on Windows - checking system path!
[debug] ResourceLoader: checkLibsDir: Added libs dir to path: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs
[debug] ResourceLoader: checkLibsDir: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs;C:\ProgramData\Oracle\Java\javapath;C:\Apps\oracl...
[debug] ResourceLoader: checkLibsDir: checking ClassLoader.usrPaths having: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs
[debug] ResourceLoader: checkLibsDir: added to ClassLoader.usrPaths
[debug] ResourceLoader: loadLib: Now loaded: VisionProxy from:
C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs\VisionProxy.dll
[debug] ResourceLoader: checkLibsDir: Using libs at: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs
[debug] Screen: initScreens: ScreenDevice 0 contains (0,0) --- will be used as primary
[debug] Screen: initScreens: basic initialization (1 Screen(s) found)
[debug] Screen: *** monitor configuration (primary: 0) ***
[debug] Screen: 0: S(0)[0,0 1920x1080]
[debug] Screen: *** end monitor configuration ***
[debug] Mouse: init
[debug] KeyBoard: init
[debug] ResourceLoader: loadLib: Now loaded: WinUtil from:
C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs\WinUtil.dll
[debug] Jython: requested to use as default region: R[0,0 1920x1080]@S(0)
[debug] Jython: sikuli: Sikuli: ending init
[log] App.open notepad.exe(10836)
[debug] Region: find: waiting 3.0 secs for Edit to appear in R[189,95 851x782]@S(0)
[error] ImagePath: setBundlePath: invalid BundlePath: null
using working folder: C:\Users\pierreb\PycharmProjects\detect_region\dr
[debug] ImagePath: new BundlePath: C:/Users/pierreb/PycharmProjects/detect_region/dr
[error] Image: could not be loaded: file:C:\Users\pierreb\PycharmProjects\detect_region\dr\Edit.png
[debug] TextRecognizer: init OK: using as data folder:
C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs\tessdata
[debug] Region: doFind: Switching to TextSearch
[debug] Region: find: Edit has appeared
at M[509,144 19x9]@S(S(0)[0,0 1920x1080]) S:1.00 C:518,148 [359/183 msec]
[error] ObserverCallBack: jython init: we have problems
org.sikuli.scriptrunner.ScriptRunner
[debug] Region: R[509,153 531x724]@S(0): observer CHANGE with callback: 1422618340524 with: 100
except->[<<type 'exceptions.TypeError'>>, <observe(): expected 0-1 args; got 2>]
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.