Experiment won't run on mac - 'can't open file...no such file or directory'

Hi,

I’m using a Mac OS sierra, PsychoPy v 1.85.2.

I am new to psychopy and desperately need help to solve this issue! I am trying to run an experiment on my mac, however I get the following error message…

Running: /Users/betty/Desktop/CItaskNegativeNEW Zhimin’s ITI scale not modified for EC/EC_taskNEG1_lastrun.py
/Applications/PsychoPy2.app/Contents/MacOS/python: can’t open file ‘/Users/betty/Desktop/CItaskNegativeNEW Zhimins ITI scale not modified for EC/EC_taskNEG1_lastrun.py’: [Errno 2] No such file or directory

Running: /Users/betty/Desktop/CItaskNegativeNEW Zhimin’s ITI scale not modified for EC/EC_taskNEG1_lastrun.py
/Applications/PsychoPy2.app/Contents/MacOS/python: can’t open file ‘/Users/betty/Desktop/CItaskNegativeNEW Zhimins ITI scale not modified for EC/EC_taskNEG1_lastrun.py’: [Errno 2] No such file or directory

It does run on windows 10, but none of the macbooks/imacs that i have tried. The experiment was created in psychopy version 1.78.01

I made sure the experiment folder is on my desktop rather than usb. However the same error message appeared.

Any help much appreciated! Thanks.

This may not be your issue, but firstly, try not using spaces and other odd characters (like single quote ’ ) in your file names and directory names e.g. Zhimin’s …

e.g. python /home/andre/CItaskNegativeNEW Zhimin’s ITI scale not modified for EC/EC_taskNEG1_lastrun.py
python: can’t open file ‘/home/andre/CItaskNegativeNEW’: [Errno 2] No such file

removing ’ and replacing spaces for _ … this happens …

python /home/andre/CItaskNegativeNEW_Zhimins_ITI_scale_not_modifiedCfor_EC/EC_taskNEG1_lastrun.py

… Works.

1 Like

I just changed the name of the file as you said and it’s working! Thank you so much for your help!! :smiley:

To get rid of this error you can try using os.listdir() function to check that at least python sees the file exists or not.