SONA integration with URL

URL of experiment: https://run.pavlovia.org/ennadarcy/testingaslearning

Description of the problem: For integrating SONA with the online experiment I was required to enter a ‘completed URL’, given to me from the SONA site, in the experiment settings so that students access the experiment through SONA could be awarded credits automatically.

I entered ‘html’ into the output path, and this URL for the completed URL

$”https://tcd-psy.sona-systems.com/webstudy_credit.aspx?experiment_id=105&credit_token=399d75fda3b546dcbc91bb9c6c20fec5&survey_code=”+expInfo[‘participant’]

When I tried to sync the amendments to the experiment online the following error occurred:

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 1221, in onPavloviaSync
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 719, 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 225, in writeScript
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/components/settings/init.py”, line 598, in writeExpSetupCodeJS
TypeError: str returned non-string (type NoneType)

I also tried to remove the outpath path as ‘html’ but then it wouldn;t even allow me to enter the completed URL in the settings.

Any ideas? Does anyone maybe recognise something that might be off with the URL?

Have you accidentally used smart quotes instead of dumb ones?

No they were dumb quotes. I re-entered the completion URL there this morning into the eperiment settings and it synced. I then ran the experiment, from the pavlovia site and both parts of the experiment worked.

Then I tried to run part both parts of the experiment through the SONA site as a student following the link. The experiment loaded but the following error occurred when I tried to progress beyond the welcome screen by pressing the right arrow key

Error: Unfortunately we encountered the following error: Type Error: Cannot read property ‘0’ of undefined.

This appeared when entering the experiment from both links on the SONA website. Any ideas?

I think this is an issue with integration between SONA and PsychoPy. I removed the coding
?participant=%SURVEY_CODE% from the end of the experiment URL, and it’s now running fine through the SONA site.

This addition to the URL is supposed to allow automatic notification when a student completes the experiment so that SONA can automatically add credits. As I can do this manually, with researcher status on SONA, I have removed this addition to the experiment URL, so that I can just run my experiment.

Thank you for your help.