sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #57338
Re: [Question #697937]: image not found during 2nd run
Question #697937 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697937
Description changed to:
Hello,
I hope someone can help me with the following problem
Kind regards,
Daniel
1. I run the script as shown below.
2. the first run, object1 is created and "mypicture.png" is found.
3. object 2 is created with a rectangle with size 123,123,123,123
...no problem so far...
4. the second run: the image "mypicture.png" is NOT FOUND. Note the area where it's looking for has the size of the rectangle from class 2. 3rd, 4th run: same problem
6. restarting the Sikulix IDE 'solves' the problem
IDE: 2.0.5 build: 2021-3-3 9:10
VIDEO: https://drive.google.com/file/d/1iFq9ZgzDraCM7b-kL4IZiLHb0WCzgt1d/view?usp=sharing
============================================
from sikuli import *
class Myclass1:
def mydef1(self):
match1 = find("mypicture.png")
match1.highlight(2)
class Myclass2:
def mydef2(self):
myRect = setRect(123,123,123,123)
myRect.highlight(2)
myobj1 = Myclass1()
myobj1.mydef1()
myobj2 = Myclass2()
myobj2.mydef2()
====
Error after running this script for the 2nd (!!!!!!) time:
-----
[error] script [ module1 ] stopped with error in line 18
[error] FindFailed ( mypicture.png: (48x25) seen at (527, 325) with 0.90 in R[123,123 123x123]@S(0) )
[error] --- Traceback --- error source first
line: module ( function ) statement
6: main ( mydef1 ) match1 = find("mypicture.png")
18: main ( <module> ) myobj1.mydef1()
[error] --- Traceback --- end --------------
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.