[2.0.4] Match does not act like Region using text() --- fixed in 2.0.5

Bug #1883605 reported by Chris Kosieracki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

Bug Description

----------------------- workaround
cast Match to Region
instead
reg1 = find(tc)
use
reg1 = Region(find(tc))
-----------------------------------------------------------

2.0.4-2020-03-14_08:01/Mac10.14.5/Java8(64)1.8.0_251-b08

This was working in 1.1.4
I'm using the find(image) to set a region, then modify its boundaries for use in region.text()
The region.text() is now finding the text in the original region rather than the modified region.

Open the attached file 'text image.png' and use a screenshot of it to replace the image in the first line of the script

Here is the simplified script:

tc = Pattern("1592253974892.png").similar(0.89)
if exists(tc):
    reg1 = find(tc)
    reg1.setX(reg1.getX()+reg1.getW())
    reg1.setW(105)
    reg1.highlight(1)
    bld = reg1.text()
    print(bld)
else:
    print('not found')

Revision history for this message
Chris Kosieracki (cckozie) wrote :
RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 2.0.5
summary: - Problems with region.text() in 2.0.4
+ [2.0.4] Match does not act like Region using set(XYWH)
RaiMan (raimund-hocke)
summary: - [2.0.4] Match does not act like Region using set(XYWH)
+ [2.0.4] Match does not act like Region using text()
description: updated
RaiMan (raimund-hocke)
summary: - [2.0.4] Match does not act like Region using text()
+ [2.0.4] Match does not act like Region using text() --- fixed in 2.0.5
Changed in sikuli:
status: In Progress → Fix Committed
importance: Medium → High
importance: High → Critical
Revision history for this message
RaiMan (raimund-hocke) wrote :

A fix will be available with 2.0.5 soon.
Use workaround until then.

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.