Why my pattern can not be found during run but can be found in offline

Asked by Chengpu Wang

Hi,

I am new to Sikuli. I am running the latest Sikuli on Win7x64. Here is my code to detect the top of this page:

find(Pattern("SikuliCodeOx-1.png").similar(0.51))

My run gets the following exception:

[error] An error occurs at line 1
[error] Error message: Traceback (most recent call last):
 File "C:\Users\cwang359\AppData\Local\Temp\sikuli-tmp810604795753824909.py", line 1, in
 find(Pattern("SikuliCodeOx-1.png").similar(0.80))
 Line 9, in file C:\Users\cwang359\AppData\Local\Temp\sikuli-tmp810604795753824909.py

 at org.sikuli.script.Region.handleFindFailed(Region.java:420)
at org.sikuli.script.Region.wait(Region.java:511)
at org.python.proxies.sikuli.Region$Region$0.super__wait(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

org.sikuli.script.FindFailed: FindFailed: can not find Pattern("SikuliCodeOx-1.png").similar(0.8) on the screen.
 Line 9, in file C:\Users\cwang359\AppData\Local\Temp\sikuli-tmp810604795753824909.py

If I click on the image and choose the Matching Preview tab, it can be found with similarity setting up to 0.95.

Why my pattern can not be found during run but can be found in offline--even after I lower the similarity level from 0.7 to 0.5?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Chengpu Wang
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

It seems you are running RC3, which is not the latest version.

If you have tried to get version 1.0.1 then you now have some mixup between the 2 versions:
--- this error message is from RC3
--- at org.sikuli.script.Region.wait(Region.java:511) is not in version 1.0.1

so please clarify and exactly post your setup.

Revision history for this message
Chengpu Wang (chengpu) said :
#2

I will reinstall latest Sikuli