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

Asked by JamesPanteleone

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

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

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Isny
Solved:
Last query:
Last reply:
Revision history for this message
Sergey Darovskih (darovskih) said :
#1

try findAll

Revision history for this message
JamesPanteleone (jamesp) said :
#2

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

Revision history for this message
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

Revision history for this message
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).

Revision history for this message
JamesPanteleone (jamesp) said :
#5

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

Revision history for this message
JamesPanteleone (jamesp) said :
#6

Thanks Isny, that solved my question.