Reading an old Psychopy script written with Python 2

Hello,
I am looking for a solution to read this script in Python 2 using an older version of Psychopy !

I have been handed a script that was written about 3 years ago, using Python 2, the version of Psychopy is probably something like 3.2.0 and I really have to make it work for the interns in my lab.

When creating a virtual environment with Python 2 (venv, anaconda or another computer), and trying to install psychopy on it there are errors like (“python setup.py egg_info” failed with error code 1). Also, I haven’t found a way to change the Python version inside Psychopy (just found a way to change the psychopy version).

Note : I have already tried to make it readable by Python3 by using 2to3 library, correcting many, many things in the script, I spent multiple days on debugging and trying every solution, but the output is still not as it should be and I don’t know how to get any further.

Thank you in advance !

Was the original written in Coder or Builder? You could upload the file here in case someone else can convert it for you.

Hello,
It was written by someone else a long time ago in the coder part. If it was done in the builder, changing the version would have been enough.
Here is the code with the files :
psychopy_files_swahili.zip (8.8 KB)

Although it failed to run in my copy of PsychoPy 1.90.3, it seemed to work in 2020.2.10 and 2021.1.4. Just in case it makes a difference, here is an updated .py file (saved from 2021.1.4)

ManipFrancaisSwahiliV3.py (22.2 KB)

The problem was never the fact that it doesn’t work. But the output isn’t complete. It only gives a few responses instead of the full one.

How about this file ? It’s the original one written in python 2 (not modified). Thank you in advance for your help !
ManipFrancaisSwahiliV1.zip (8.1 KB)