Simultaneously randomize two columns in conditions file

Thanks very much for creating this demo!! I’m sure it will help many other users too.

I’ve got a question and am receiving an error message when trying it out.

First, my error:

listA.append(str(int(grid)))
ValueError: invalid literal for int() with base 10: ‘myimage.png’

I suppose I’m receiving this error because the names of png files that the code is reading in are not simply integers. Is there a way to solve this without changing all of my file names?

Now the question:

Just to be sure, I don’t need the code in the ‘trial’ routine, do I? That is simply to rate the answers as correct or incorrect and give feedback at the end, right?

Thanks again for your help.

EDIT:

I changed the code to

listA.append(str(str(grid)))

and now I can run the experiment without an error message. I’ll leave the error message in case it helps anyone reading this in the future.