psychopy.org | Reference | Downloads | Github

Both the stim3d.py and TrialHandler.py programs with PsychoPy 2020.1.1 do not run properly

I noticed the problem with PsychoPy 2020.1.1 regarding Coder demo programs on Mac OS 10.14.6.

The stim3d.py shows FileNotFoundError: [Errno 2] No such file or directory: ‘face.jpg’

and the TrialHandler.py does not make testData files with no errors.

It’s this issue redux: Working directory change with 2020.1 and later?

If you want a temporary fix, at the top of the file put the following two lines and it should work.

import os
os.chdir(os.path.dirname(os.path.realpath(__file__)))

Long term this either needs to be added to everything in PsychoPy that references a file in a local folder, or something about the way PsychoPy runs scripts needs to change.

1 Like

Thank you very much.
Your suggestions completely solved my problems.
But I request developers of Psychopy to make the programs work without modifications because the programs are demo inside Psychopy.

@jon and I are working on it, should be fixed in the next update: https://github.com/psychopy/psychopy/issues/2816

1 Like