| Reference | Downloads | Github

Running an new experiment on an older version

OS: Win10
Standalone? yes

Hi! I am trying to run an experiment that was built in the new version of Psychopy (2021.1.2) in an older version (v3.2.4). Long story short - the old version is what we have installed on the scanning computer and we can’t update it without compromising other people’s experiments.

The new task (fully built in the builder) won’t run on the older version, or even compile to script. We get this error when we try to compile: “TypeError: Can’t represent a Param of type color” as well as several warnings, including “67088.6736 WARNING Parameter ‘contrast’ is not known to this version of PsychoPy but has come from your experiment file (saved by a future version of PsychoPy?). This experiment may not run correctly in the current version.”

We have tried copying over individual routines, including just simple text objects, but we get the same error.

Is there any way to get it to run on version 3.2.4 without rebuilding the entire experiment?

Advice is much appreciated. Thanks.

1 Like

You can open the experiment file (which is an editable text object) and change type=“color” to type=“str” and delete the contrast rows from all text components. I’ve done this successfully with search and replace in PFE (Programmer’s File Editor) but I can’t remember exactly what my replaces were.

Thank you! Can you specify what you mean by an experiment file? I have the script (ending in .py) and the builder file (.psyexp) but neither of these seem to set type=“color” anywhere

Here’s an example text component in one of my psyexp file

      <TextComponent name="text_2">
        <Param name="color" updates="constant" val="white" valType="color"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="contrast" updates="constant" val="1" valType="num"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="num"/>
        <Param name="flip" updates="constant" val="None" valType="str"/>
        <Param name="font" updates="constant" val="Open Sans" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="num"/>
        <Param name="name" updates="None" val="text_2" valType="code"/>
        <Param name="opacity" updates="constant" val="" valType="num"/>
        <Param name="ori" updates="constant" val="0" valType="num"/>
        <Param name="pos" updates="constant" val="(0, 0)" valType="list"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="num"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0.0" valType="num"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="num"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="constant" val="Press the space bar to continue" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="num"/>

<Param name="color" updates="constant" val="white" valType="color"/>

needs to be changed to

<Param name="color" updates="constant" val="white" valType="str"/>

I suspect that the other step is that you need to delete lines like

        <Param name="contrast" updates="constant" val="1" valType="num"/>

An option I used in a similar situation is to install PsychoPy in a separate conda environment (see here). This way, you can run PsychoPy of the version you need without affecting the PsychoPy that other people use.