Exist not finding image even though it exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Invalid
|
Undecided
|
Unassigned |
Bug Description
In the script below the routine looks for the text "Auction Complete" and if it exists does something. The problem is that the image exists, and is shown if you do a pattern matching on the image but when you run the script the image is not detected even though it is there.
Script
outcome = bid_test()
print("The outcome is...",
def bid_test():
Debug.user("In make_bid")
print("In Make Bid")
#
# if ending soon is not present somethin went wrong, either we are too early
# or someone bought the item
if exists (Pattern(
return(1)
else:
print(" Auction is not ending yet need to rerty")
return (2)
This is sikuli 2.0.1 on Win10 Pro 64 Bit Version 1903. I can provide a screen shot which has the image the script should detect.
Changed in sikuli: | |
status: | New → Invalid |
Some more info:
If I run the script is sikuli1.1.3 then the following error is thrown:
[error] Image: could not be loaded: file:/C: /Users/ mmcguinn/ Documents/ main_bid_ test.sikuli/ test_for_ complete. png for_complete. png -- not valid!) S: 0.79
[error] RunTimeIDE: ImageMissing: P(test_
This happens even though the image is there and is accessible. The java trace is:
[error] RunTimeIDE: Exists: Abort: Jython traceback - current first: bid_test (8) main_bid_test (2) mmcguinn\ Documents\ main_bid_ test.sikuli\ main_bid_ test.py" , line 2, in <module> File "C:\Users\ mmcguinn\ Documents\ bid_test. sikuli\ bid_test. py", line 8, in bid_test at java.lang. Thread. stop(Unknown Source) script. RunTime. abortScripting( RunTime. java:74) script. Region. exists( Region. java:2390) script. Region. exists( Region. java:2370) NativeMethodAcc essorImpl. invoke0( Native Method) NativeMethodAcc essorImpl. invoke( Unknown Source)
[error] script [ main_bid_test ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\Users\
at org.sikuli.
at org.sikuli.
at org.sikuli.
at sun.reflect.
at sun.reflect.
at sun.refle