X-1.0rc2: Region spatial operators (nearby, left, right, ...) do not return a Region object --- workaround

Bug #778819 reported by anatoly techtonik
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Critical
RaiMan

Bug Description

affected is the Python level
they seem to return a Region object from the Java level, that cannot be used the same way on the Python level
This gives errors when trying to use Region methods with these Regions (like Region.click())

*** workaround
cast the region to a Region object on the Python level, e.g.
Region(other_region.nearby(100)).click("some-image.png")
-------------------------------------------------------------------------------------------

This gives the error above:

    for ready in region.findAll(status):
      ready.nearby(100)).click(ok)

Note that this also gives the same error:

    for ready in region.findAll(status):
      ready = Region(ready)
      ready.nearby(100).click(ok)

Only this one works without `click(): expected 2 args; got 1` error:

    for ready in region.findAll(status):
      Region(ready.nearby(100)).click(ok)

Tags: fkt-region
RaiMan (raimund-hocke)
summary: - X-1.0rc2: TypeError: click(): expected 2 args; got 1
+ X-1.0rc2: Region spatial operators (nearby, left, right, ...) do not
+ return a Region object
Changed in sikuli:
status: New → Confirmed
description: updated
Revision history for this message
RaiMan (raimund-hocke) wrote : Re: X-1.0rc2: Region spatial operators (nearby, left, right, ...) do not return a Region object

Thanks for reporting this.

summary: X-1.0rc2: Region spatial operators (nearby, left, right, ...) do not
- return a Region object
+ return a Region object --- workaround
RaiMan (raimund-hocke)
Changed in sikuli:
status: Confirmed → Fix Committed
importance: Undecided → Low
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → x1.0
RaiMan (raimund-hocke)
tags: added: fkt-region
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Low → High
RaiMan (raimund-hocke)
Changed in sikuli:
importance: High → Critical
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.