psychopy.org | Reference | Downloads | Github

Running PsychoPy2 Experiment in PsychoPy3

Hello,
I was trying to run an experiment created using PsychoPy2 Experiment Builder (v1.83.01), 2015 in PsychoPy3 and it does not work.
An error occured an the experiment does not run:

##################### Running: C:\Users\Sara\Desktop\v5.py #####################
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
9.2382 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
Traceback (most recent call last):
File “C:\Users\Sara\Desktop\v5.py”, line 24, in
_thisDir = os.path.dirname(os.path.abspath(file)).decode(sys.getfilesystemencoding())
AttributeError: ‘str’ object has no attribute ‘decode’

Experiment ended.

I’d be glad to get some feedback and information on what to do.
Sara

The installation with which you created the experiment was based on Python2 and now your installation is based on Python3.

I haven’t tried this out and it could be that Psychopy 2020.1 is not fully backwards compatible with the version you used for creating the experiment, but if you desperately want to run this experiment with a newer version of Psychopy, your best bet is probably to install the PsychoPy_PY2 release of v2020.1, which you can find here: https://github.com/psychopy/psychopy/releases