Experiment built on psychopy 2023 cannot run on another computer installed with psychopy 2020

If this template helps then use it. If not then just delete and start from scratch.

OS Win10:
PsychoPy version : PsychoPy 2020.2.10

I built a Exp on my coworker’s computer, which installed the newest psychopy(2023), it runs well. But then I failed in running it on mine, which is an old version psychopy(2020.2.10).
I didn’t use any fancy component, just some images, keyboards, texts, and loops. Still, it fails.

Should I install a new psychopy, too? should I unload the old one before I install the new? or the new package installation will do it automatically?

I’m worried about that my old experiments might be damaged after installing the new version, or some other errors. So I want to ask it first, is it safe to install a new psychopy?

thanks a lot!
Here is the Error detials:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1066, in runFile
self.app.runner.panel.runLocal(event)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\runner\runner.py”, line 559, in runLocal
exp=self.loadExperiment())
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 221, in makeTarget
script = thisExp.writeScript(outfile, target=targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 202, in writeScript
self_copy.settings.writeWindowCode(script) # create our visual.Window()
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\settings_init
.py", line 768, in writeWindowCode
buff.writeIndentedLines(code % self.params)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\params.py”, line 215, in str
self.valType)
TypeError: Can’t represent a Param of type color

Hello,

you could try to set the Use PsychoPy version on your coworker’s computer and see if this works. Newer PsychoPy-versions introduce new parameters to components which may cause problems.

The newer PsychoPy-versions will not damage your experiments. The main difference, besides bug fixes and new features, is that newer PsychoPY version no longer use an html-folder to store stimuli when running online. There are a couple of posts how to deal with this problem.

Best wishes Jens

1 Like

thanks a lot!!

Do you know about the useVersion setting for experiments? That causes PsychoPy to fetch the appropriate version of the psychopy lib and run using that (even if the version requested is newer than the one installed!)

If your experiment works well on 2023 then you could use this feature in 1 of 2 ways (or you can do both):

  • go to the experiment settings of your exp and tell it to use 2023.1.3 (or something) and see if that works on the older install
  • alternatively, install the latest version of the app on those machines but set the existing experiments to use the older version in that setting

Caveat: The reason the useVersion sometimes doesn’t work (depending roughly on how far apart the installed and desired version is) is that it doesn’t change the installed dependencies and sometimes those are incompatible. For instance, if a lib changes and our code becomes incompatible, then we fix the PsychoPy code to handle that and new releases can then be packaged with the new lib. But when you load an experiment using the old version of PsychoPy it won’t include that fix so, the experiment may crash.

The general recommendation though is that when you start running a study for real, do set the useVersion value to the one you developed it on and that will insulate you to a certain degree to different versions of the installed app

2 Likes