| Reference | Downloads | Github

ValueError stops me from running experiment

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 1.85
Standard Standalone? (y/n) If not then what?: Y
What are you trying to achieve?: Running a gaze following task - worked with my other computer (Win7 with PsychPy 1.84.2), but not in this computer

What specifically went wrong when you tried that?: experiment does not run, simply grey screen appears then error message

Hi @ulogin, are you defining your positions in a spreadsheet as a tuple e.g., (1,0) ?

Yes @dvbridges!

I’ve tried deleting the spaces before and after “,”, and it did not solve the issue.

And again, the task runs fine with 1.84.2 on a Win 7 machine. But I need it to be run on a laptop now, so it’s either Win 10 or a Macbook.

Would it be easier if I just revert back, from 1.85.4 to 1.84.2? Would it solve the problem?

Further to my last post, I’ve just tried another machine (PsychoPy 1.85.4 on a Macbook), and this time I’ve got another error message. It’s an “OSError”:

As the error indicates, you have a string representation of a tuple '(-10, 0)', which you need to convert into an actual tuple (-10, 0), such as by using the eval() function.

PsychoPy does its best to import numbers from conditions files, but you presumably have cells in that file containing (-10, 0). Since that contains non-numeric characters, PsychoPy can’t mind-read what is intended, and so imports it as a character string. You then have the responsibility to convert it into the appropriate class as required, e.g.


You could avoid this by splitting the two coordinates into separate columns (say x and y), and then specify things like this:

image_3.setPos(x, y)
1 Like

PsychoPy 1.84.2 could mind read but not 1.85.4? As I said, it worked with with my other machine. But thanks, anyway.

What about the OSError on my Macbook? Same issue?

And yet, here we are (as per error message).

Clearly not (as per error message).

I wish I could read error message. The original script was written by someone else; I am new to PsychoPy (and to programming), so I just modified it a little without knowing what made it work. As I said, it did work with my old machine and old laptop (both with older version of PsychoPy installed).

Would you be so kind to tell me what this OSError is and how to get around it? You have been super helpful; you actually told me how to changed the script for the ValueError. But I most likely need to run the task on my Macbook as well, so I would really could use your help.

I appreciate it!

Sorry, I don’t really understand that error. It doesn’t really appear to be an issue related to your particular experiment code, though. It looks like more of an issue with the PsychoPy installation itself. It might be worth you installing 1.85.6 from here: as that had a few bug fixes in it.