sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #53737
[Bug 1857230] Re: Exist not finding image even though it exists
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
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1857230
Title:
Exist not finding image even though it exists
Status in Sikuli:
New
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1857230/+subscriptions
References