← Back to team overview

sikuli-driver team mailing list archive

[Bug 1461533] [NEW] [1.1.0] exists(Pattern().similar(0.9)) matches with 0.71 second time

 

Public bug reported:

Please help me.
Here is my code:
def open_shop(self):
        API.log('open_shop')

        # check if its already opened
        API.log(str(Pattern(Interface.Action['shop_slide']).similar(0.9)))
        shop_slide_match = self.GR.exists(Pattern(Interface.Action['shop_slide']).similar(0.9), 5)
        if shop_slide_match:
            API.log('-------------' + str(shop_slide_match))
            self.click(shop_slide_match.offset(Location(-25, 0)))

here is my log:
P(Game/Action/shop_slide.png) S: 0.9
-------------M[1650,464 85x32]@S(S(0)[0,0 1920x1080]) S:0,71 C:1692,480 [21/21 msec]

how can this be? I say look for an image with similar (0.9) and I found
it with (0.71)

it happens when I call the method again

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: In Progress

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.0

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1461533

Title:
  [1.1.0] exists(Pattern().similar(0.9)) matches with 0.71 second time

Status in Sikuli:
  In Progress

Bug description:
  Please help me.
  Here is my code:
  def open_shop(self):
          API.log('open_shop')

          # check if its already opened
          API.log(str(Pattern(Interface.Action['shop_slide']).similar(0.9)))
          shop_slide_match = self.GR.exists(Pattern(Interface.Action['shop_slide']).similar(0.9), 5)
          if shop_slide_match:
              API.log('-------------' + str(shop_slide_match))
              self.click(shop_slide_match.offset(Location(-25, 0)))

  here is my log:
  P(Game/Action/shop_slide.png) S: 0.9
  -------------M[1650,464 85x32]@S(S(0)[0,0 1920x1080]) S:0,71 C:1692,480 [21/21 msec]

  how can this be? I say look for an image with similar (0.9) and I
  found it with (0.71)

  it happens when I call the method again

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1461533/+subscriptions


Follow ups

References