← Back to team overview

sikuli-driver team mailing list archive

[Question #272686]: find not working properly / HowTo Debug

 

New question #272686 on Sikuli:
https://answers.launchpad.net/sikuli/+question/272686

with
java version "1.8.0_60" / SikuliX  (build 201510051707) / run with -d 3

I have a strange situation:
In my code, If a find fails, I redo one on full screen, with less and less similar value.

the code is like this :

try:
  Searched = self.m_Region.find(aPSMRL)
except FindFailed, Message: 
  for x in range (20,4,-1):
                try:
                    AllMatch = list(Sikuli.findAll(Pattern(aPSMRL).similar(x/20.0)))
                    for aMatch in  AllMatch:
                        print('Found one with score: %.2f/%.2f' % (x/20.0,aMatch.getScore()))
                    break
                except FindFailed, Message: 
                    printdebug('Not Found for: %.2f' % (x/20.0))


The Problem is that, sometime, after a failed find with default "0.8" similarity , the findAll find a match at 0.95 !!

Output look like :

[debug (21/10/15 14:44:00)] Region: find: waiting 3,0 secs for P(OK.png) S: 0.8 to appear in R[384,234 513x336]@S(0)
[debug (21/10/15 14:44:00)] Region: checkLastSeen: not there
[debug (21/10/15 14:44:03)] Region: find: P(OK.png) S: 0.8 has not appeared [250 msec]

[debug] 14:44:08 / Not Found for: 1.00
14:44:08 / Found one with score: 0.95/1.00


How Can we explain this ? ( I've added some sleep nefore the 1rst find to be sure image was already on screen )
How to activate more trace ?




-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.