Design compatible with PsychoPy 2020.1.3

Hi! I need a PsychoJS version of my experiment that can be run on 2020.1.3. So, I open a clean builder page, set the PsychoPy version in the experiment settings to 2020.1.3. However, if I put a simple routine (such as display text + polygon + mouse component to proceed when the polygon is clicked) and try to Export HTML, I get the following list of errors. I have always been using the most recent PsychoPy version, and I do not know what I can do to make the program backwards compatible. What am I doing wrong?

Cheers!


pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
9.3865 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).
9.4010 WARNING Parameter ‘Data file delimiter’ 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.
9.4012 WARNING Parameter ‘Resources’ 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.
9.4100 WARNING Parameter ‘Before Experiment’ 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.
9.4101 WARNING Parameter ‘Before JS Experiment’ 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.
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “C:\Program Files\PsychoPy3\lib\runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 250, in
compileScript(args.infile, args.version, args.outfile)
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 214, in makeTarget
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “C:\Users\bartl\AppData\Roaming\psychopy3\versions\psychopy\experiment_experiment.py”, line 223, in writeScript
entry.writeInitCodeJS(script)
File “C:\Users\bartl\AppData\Roaming\psychopy3\versions\psychopy\experiment\routine.py”, line 124, in writeInitCodeJS
thisCompon.writeInitCodeJS(buff)
File "C:\Users\bartl\AppData\Roaming\psychopy3\versions\psychopy\experiment\components\text_init
.py", line 161, in writeInitCodeJS
buff.writeIndentedLines(code % inits)
File “C:\Users\bartl\AppData\Roaming\psychopy3\versions\psychopy\experiment\params.py”, line 204, in str
self.valType)
TypeError: Can’t represent a Param of type extendedStr
440.0644 INFO C:\Program Files\PsychoPy3\python.exe -m psychopy.scripts.psyexpCompile D:\Dokumenty\PsychoPy\arty2\1\learningNW.psyexp -o D:\Dokumenty\PsychoPy\arty2\1\learningNW.js -v 2020.1.3

I think you’re misunderstanding what the Version in Experiment Settings does - it tells PsychoPy to run the experiment in a particular version of the PsychoPy library, regardless of what version of the PsychoPy app you’re using. So to make an experiment in 2021.1.x which can run on 2020.1.3 you need to set the version in Experiment Settings to be 2021.1.x, so that when it’s opened in 2020.1.3 it still uses the newer version of the library.

Am I misunderstanding this? I thought it was

So to make an experiment in 2021.1.x which can run on 2020.1.3 you need to set the version in Experiment Settings to be 2020.1.3, so that when it’s opened in 2020.1.3 it uses that version of the library (instead of a library from the future).

Yep, it’s the other way around! 2021.1.x has parameters which didn’t exist before, so if you build an experiment in 2021.1.x then it needs the new library to run - so the version needs to be set to 2021.1.0 or higher, to tell older versions to use the newer library

1 Like

I almost always have my version to run as blank so it uses whatever version I’m working in.

Thank you for the clarification!