findAll not accepting Pattern as argument

Bug #517702 reported by Michael Stewart
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Undecided
Unassigned

Bug Description

1: Sikuli 0.9.8
2: OS X 10.5.8
3: Write a script that uses findAll with a pattern as the argument (as documented at http://sikuli.org/doc/pythondoc-python.edu.mit.csail.uid.Sikuli.html#python.edu.mit.csail.uid.Sikuli.findAll-function ), my simple test example is the following:
finders = findAll(Pattern( ).similar(.96))
the argument to Pattern here is an image of the OSX Finder icon from the dock)
4:
[sikuli] [Error] source lineNo: 1
[sikuli] [Error] Traceback (innermost last):
  File "/var/folders/wj/wjjBBPXZFzm2u74E0Ja7cU+++TM/-Tmp-/sikuli-tmp1128182142701116663.py", line 1, in ?
  File "/Applications/Sikuli-IDE.app/Contents/Resources/Java/sikuli-script.jar/Lib/python/edu/mit/csail/uid/Sikuli.py", line 381, in findAll
TypeError: findAll(): 1st arg can't be coerced to String

if I change the "findAll" in my example to "clickAll", "click", or "find" it works, just fine.

Revision history for this message
Michael Stewart (stewarcm) wrote :
Revision history for this message
RaiMan (raimund-hocke) wrote :

possible circumvention:
finders = find(Pattern( ).similar(.96).firstN(1000)).regions

should give you that what findAll should return

Revision history for this message
RaiMan (raimund-hocke) wrote :

I told nonsense, since find() per definition does only return the best match (if any) and it does not know .regions (only .region).

So the bug can not be circumvented in an easy way.

Changed in sikuli:
status: New → In Progress
RaiMan (raimund-hocke)
tags: added: 0.10
Changed in sikuli:
milestone: none → 0.10.0
Revision history for this message
RaiMan (raimund-hocke) wrote :

a fun now with version 0.10.

Changed in sikuli:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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