problem with images not found, though they are visible on screen

Asked by Pramod Kumar

I downloaded sikuli1.0rc2 and python2.7 and tried to run python test script.But i get following errors:

ScreenMatchProxy loaded.
VDictProxy loaded.
Win32Util loaded.
ScreenMatchProxy loaded.
[sikuli] Stopped
[sikuli] An error occurs at line 4
[sikuli] Error message:
Traceback (most recent call last):
  File "C:\Users\PRAMOD~1\AppData\Local\Temp\sikuli-tmp5568800081005509427.py", line 4, in <module>
    Tmp=find("1231428364684.png")
  File "C:\Sikuli\sikuliiiiiiii\Sikuli-IDE\Lib\sikuli\Region.py", line 59, in find
    ret = JRegion.find(self, target)
  Line 220, in file C:\Users\PRAMOD~1\AppData\Local\Temp\sikuli-tmp5568800081005509427.py

 at edu.mit.csail.uid.Region.wait(Region.java:240)

 at org.python.proxies.sikuli.Region$Region$1.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)

edu.mit.csail.uid.FindFailed: FindFailed: 1231428364684.png can't be found.
  Line 220, in file C:\Users\PRAMOD~1\AppData\Local\Temp\sikuli-tmp5568800081005509427.py

Please answer the query ASAP.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
j (j-the-k) said :
#1

You seem to use a very old version of Sikuli and should upgrade to the latest version (see http://www.sikuli.org/download.html).
Also, the version of Sikuli you are using is not supporting python 2.7.

The error you posted could be because the image file was not found in your file system or it was not found on the screen.

Revision history for this message
Pramod Kumar (pramodkumar123) said :
#2

i downloaded Sikuli-IDE-1.0.0 and run the script with python2.7 installed on my system.Still i get following error:

Inst01 Matching Score:
0.920218765736

[error] script [ CED_GUI_001_01 ] stopped with error in line 20
[error] FindFailed ( can not find EMGDConfigur.png on the screen. )

The required image file is present on screen.

Revision history for this message
rob (reg82) said :
#3

providing some code will help others troubleshoot for you. also, sikuli scripts use jython 2.5 not python 2.7, and having both sikuli and python installed is perfectly ok. i have both installed and i use both everyday.

Revision history for this message
Pramod Kumar (pramodkumar123) said :
#4

###########################################################################
#1) Verify on right frame
###########################################################################
#Rgt01
if not exists ("BlEMGDConfiu.png"):
 popup ("CED Editor not exists.ErrorCode: Rgt01")
 exit()

#Rgt02- check the default is EMGD tab
Tmp=find("H4GD.png")
print "Rgt02 Matching Score:"
print Tmp.getScore()

if Tmp.getScore() <0.90:
  popup ("CED Editor not exists.ErrorCode: Rgt02")
  exit()

#Rgt03- check the right frame descriptions
Tmp=find("TheIntelErrb.png")
print "Rgt03 Matching Score:"
print Tmp.getScore()

if Tmp.getScore() <0.90:
  popup ("Invalid EMGD overview descriptions.ErrorCode: Rgt03")
  exit()

#check the each component descriptions
#Rgt04 check configuration desp
Tmp=find("Conngrationz.png")
print "Rgt04 Matching Score:"
print Tmp.getScore()

if Tmp.getScore() <0.90:
  popup ("Invalid Configuraiton descriptions.ErrorCode: Rgt04")
  exit()

#Rgt05 check the DTD desp
Tmp=find("DetaledTrril.png")
print "Rgt05 Matching Score:"
print Tmp.getScore()

if Tmp.getScore() <0.90:
  popup ("Invalid DTD descriptions.ErrorCode: Rgt05")
  exit()

#Rgt06 check the Package desp
Tmp=find("PackagesApad.png")
print "Rgt06 Matching Score:"
print Tmp.getScore()

if Tmp.getScore() <0.90:
  popup ("Invalid DTD descriptions.ErrorCode: Rgt06")
  exit()

#Rgt07 check the Installation desp
Tmp=find("Installation.png")
print "Rgt07 Matching Score:"
print Tmp.getScore()

if Tmp.getScore() <0.90:
  popup ("Invalid Installation descriptions.ErrorCode: Rgt07")
  exit()

click("Console.png")
sleep(2)

#Rgt08 check on Console tab
Tmp=find("BuildConsole.png")
print "Rgt08 Matching Score:"
print Tmp.getScore()

if Tmp.getScore() <0.90:
  popup ("Invalid Console windows.ErrorCode: Rgt08")
  exit()
popup(" Finish Test CED_GUI_001_5")
print "*** Finish Test CED_GUI_001_05"
exit()

Above is the script i am running with Sikuli-IDE-1.0.0 with python2.7 installed on my system.But i get above mentioned error.
Please answer asap.

Revision history for this message
rob (reg82) said :
#5

if your getting FindFailed exceptions if could be for a lot of reasons, but basically sikuli cant find the image it is searching for. since you say the image is present on the screen; make sure the image is present in the region of the screen sikuli is actually searching. by default sikuli only searches on the primary monitor so if your running script in a multi monitor environment that could be an issue. if your similarity settings are too high that could also be a problem. also make sure the png file your using for the search actually matches the screen image your searching for. i've had issues where thumbnails that i copied from one script to another wouldnt work properly, so i just recaptured the images and they worked fine. sorry if thats not a very specific answer.

Can you help with this problem?

Provide an answer of your own, or ask Pramod Kumar for more information if necessary.

To post a message you must log in.