Description of the problem: Upgraded to newest version of PsychoPy on macOS Catalina Every time I try to push an experiment to Pavlovia I get the below error:
Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 1319, in onPavloviaSync
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 759, in fileExport
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 73, in generateScript
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 242, in compileScript
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 214, in _makeTarget
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 265, in writeScript
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/routine.py”, line 287, in writeRoutineBeginCodeJS
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/components/code/__init__.py”, line 231, in writeRoutineStartCodeJS
TypeError: __str__ returned non-string (type NoneType)
Anyone know a fix for this?
Could you tell us exactly the version number you’re using please? And you might need to upload a copy of the experiment for us to investigate (assuming that other experiments are working). Preferably cut that down a a minimal working example, e.g. the issue is with one of hte code components so maybe you could just include that?
Sorry for not including the experiment (please see attached).
I am using:
macOS: Catalina V10.15.6
The experiment is very simple: 3 words appear and there is a break every Nth trial.
The error occurs on several of my macs. I have not tested it on PC. test_break.psyexp (12.8 KB) test_break.psyexp (12.8 KB) test1.xlsx (8.4 KB)
Ah, OK, I can replicate the problem by adding your Code Component. Working on it now
I can see the problem - there’s a new bug in how to code component is defined (when it gets created for the first time in PsychoPy 2021.0 or 2021.1.1). I’ll get a bug fix out very soon but, as a quick fix yourself, you can open your experiment file in a text editor and, for each parameter in the code component, change the valType from ‘code’ to ‘extendedCode’ and then reload the experiment in the Builder.
Sorry for the faff
Thanks for looking into this, @jon! I now see a whole host of posts regarding the same issue–sorry.
No, no, it’s fine. Yours was the first I saw for this particular error and a few others followed. I’m currently uploading release 2021.1.2 that should fix it
Hi, I am suddenly experiencing a similar problem in v 2021.1.3, but it is with initCodeJS instead of writeRoutineBeginCodeJS.
I have already synchronized this project a few times without issues, and this time I just wanted to push a small change in the slider width; something I’d already done.
EDIT: I found the problem; see this thread: Error syncing "TypeError: __str__ returned non-string (type NoneType)" - #7 by aisa2