Exist not finding image even though it exists

Bug #1857230 reported by Mark McGuinn
6
This bug affects 1 person
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...",str(outcome))

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("1577013855062.png").similar(0.79)) :
        print("Auction Complete")
        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.

Revision history for this message
Mark McGuinn (mmcguinn) wrote :

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
[error] RunTimeIDE: ImageMissing: P(test_for_complete.png -- not valid!) S: 0.79

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)
[error] script [ main_bid_test ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\Users\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)
at org.sikuli.script.RunTime.abortScripting(RunTime.java:74)
at org.sikuli.script.Region.exists(Region.java:2390)
at org.sikuli.script.Region.exists(Region.java:2370)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.refle

Revision history for this message
RaiMan (raimund-hocke) wrote :

sounds strange.

can you send me a screenshot AND the offending image file.
sikulix---at---outlook---dot---com

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.