Drag All Word......TypeError: iteration over non-sequence

Asked by JamesPanteleone on 2010-02-01

y = find( )<----Recycle Bin Image
for x in find( ):<----Wav File Icon Image

Testing this in XP SP3, and i get "TypeError: iteration over non-sequence"
If i declare "x = find()"<----Wav File Icon Image, it will drag and drop one file
I tweeked the similarity setting, and it finds the Recycle Bin, and the 3 Wave files.
What am i doing wrong?

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Sergey Darovskih (darovskih) said : #1

try findAll

JamesPanteleone (jamesp) said : #2

I tried that from a previous post.
It returns "TypeError: findAll(): 1st arg can't be coerced to String"

RaiMan (raimund-hocke) said : #3

x=findAll(...an image...)
for y in x:
   print str(y)

worked as it should.

capture: java.awt.Rectangle[x=0,y=0,width=1920,height=1200]
5 matches found
Match[100,122-15x15 1,00]@/var/folders/C9/C9+A8gl7F9GRQtCP6jc+VU+++TI/-Tmp-/sikuli4337400158373766014.png
Match[759,949-15x15 0,74]@/var/folders/C9/C9+A8gl7F9GRQtCP6jc+VU+++TI/-Tmp-/sikuli4337400158373766014.png
Match[628,949-15x15 0,74]@/var/folders/C9/C9+A8gl7F9GRQtCP6jc+VU+++TI/-Tmp-/sikuli4337400158373766014.png
Match[312,949-15x15 0,74]@/var/folders/C9/C9+A8gl7F9GRQtCP6jc+VU+++TI/-Tmp-/sikuli4337400158373766014.png
Match[467,949-15x15 0,74]@/var/folders/C9/C9+A8gl7F9GRQtCP6jc+VU+++TI/-Tmp-/sikuli4337400158373766014.png

Best Isny (isny) said : #4

I have the same problem. It only works if you do *not* change the similarity setting. If you change that setting, you get the same error (TypeError: findAll(): 1st arg can't be coerced to String).

JamesPanteleone (jamesp) said : #5

Isny - it worked just have to take a more percise screenshot with your tip.

JamesPanteleone (jamesp) said : #6

Thanks Isny, that solved my question.