PsychoPy 2020.2.3 is not uploading on Pavlovia

I am having trouble uploading my script online. I was wondering if anyone else has faced this issue as well?

This is the error I am getting:
Traceback (most recent call last):
File “/Users/serena/Desktop/”, line 1247, in onPavloviaRun
File “/Users/serena/Desktop/”, line 502, in syncProject
File “/Users/serena/Desktop/”, line 755, in getRepo
AttributeError: The requested local path for project
‘/Users/serena/Desktop/List 1 OR ‘

Hi, I also encountered problems of synchronizing and running my experiment from my Mac (iOS 10.15.3). The experiment was created by older version (PsychoPy 1.2).

Traceback (most recent call last):
File “/Volumes/PsychoPy 2020.2.3/”, line 1226, in onPavloviaSync
File “/Volumes/PsychoPy 2020.2.3/”, line 719, in fileExport
File “/Volumes/PsychoPy 2020.2.3/”, line 73, in generateScript
File “/Volumes/PsychoPy 2020.2.3/”, line 242, in compileScript
File “/Volumes/PsychoPy 2020.2.3/”, line 214, in _makeTarget
File “/Volumes/PsychoPy 2020.2.3/”, line 248, in writeScript
File “/Volumes/PsychoPy 2020.2.3/”, line 277, in writeRoutineBeginCodeJS
File “/Volumes/PsychoPy 2020.2.3/”, line 202, in writeRoutineStartCodeJS
File “/Volumes/PsychoPy 2020.2.3/”, line 405, in writeParamUpdatesJS
File “/Volumes/PsychoPy 2020.2.3/”, line 399, in writeParamUpdates
File “/Volumes/PsychoPy 2020.2.3/”, line 435, in writeParamUpdate
TypeError: str returned non-string (type NoneType)

1 Like

I am also experiencing some issues with the new version of psychopy. I’ve posted my issue here: No solution yet.

I was able to use an older version of PsychoPy to upload my experiment on Pavlovia. However, when I try to pilot it all I see is “initialising experiment” and I cannot pilot my study.

Hi @serena_zadoorian, sorry to hear your online experiment isn’t running as expected. Would it be possible to send me a link to your repo so I can take a closer look? The one posted above only takes me to the login page. Thank you!

Thank you @sotiri. For some reason its not allowing me to include a link.

Here is a screenshot.

OK great, thanks for the screengrab. This looks like a syntax error to do with giving the copyText stimulus a text value of ‘/* */’. Is that the intended value or were you looking for a way to comment out the value and sort of have an empty text stimulus maybe?

Please could you try having the text be an empty string or a value excluding slashes and asterisks and let me know if the problem persists? As it happens those are somewhat tricky characters with special meanings in JS if unescaped. Thank you

I apologize, I don’t seem to find copyText in the screenshot I sent previously. I am also trying to include a link of my study but it does not allow me even though the study is public.

No problem, with reference to the main script linked below that is exported from PsychoPy, lines 129-130 seem to be causing the error:

copyText = new visual.TextStim({
  win: psychoJS.window,
  name: 'copyText',
  text: /*  */
  font: 'Arial',
  units: undefined, 
  pos: [0, 0], height: 0.05,  wrapWidth: undefined, ori: 0,
  color: new util.Color('white'),  opacity: 1,
  depth: -1.0 

That could be made to work if it looked a bit like:

copyText = new visual.TextStim({
  win: psychoJS.window,
  name: 'copyText',
  text: '/*  */',
  font: 'Arial',
  units: undefined, 
  pos: [0, 0], height: 0.05,  wrapWidth: undefined, ori: 0,
  color: new util.Color('white'),  opacity: 1,
  depth: -1.0 

Sorry @serena_zadoorian, that was likely too technical an explanation :blush:
Would it be possible to send me the .psyexp file from PsychoPy instead? That might help me correct the problem at the source.

I recreated the project and now I am able to upload my link. Now when I try to pilot I get this error: 403 Forbidden.

Final SR w OR List 1.psyexp (50.3 KB)

OK great, that helps, let me take a closer look, thank you

The 403 I believe is to do with the experiment lacking an index.html. It looks as if when exporting from PsychoPy some files went missing. That could in turn be because of an error in the .psyexp itself :thinking: Please allow me some time to investigate further!

Thank you so much @sotiri for your help. I created a new study (used the same script as above) and now I am able to run my study (the html folder is created) but again the screen is stuck on “initializing the experiment”.

Hi @serena_zadoorian, no worries at all. OK the problem seems to be with the import string statement in your ‘Begin Experiment’ code. Unfortunately that is a Python built-in that has no equivalent in JavaScript, the browser’s own language. I would gladly have tried to recreate that type of functionality for you in JS, but it looks like you are only after a list of ascii characters in lowercase.

With reference to the Python manual, because the string.ascii_lowercase constant you are trying to access is relatively short you might be better off assigning instead of importing its value along the lines of string_ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'. You would then give that string_ascii_lowercase variable as input to your list() function.

I hope that makes sense. Please let me know if you need more help getting your experiment to work online.

Hello @sotiri, thank you so much for checking. I will try fixing the code right now. I also created the same experiment using the latest PsychoPy version that allows for editable textbox and I am still facing the same issue of not being able to pilot my study.

The study is stuck on “initialising the experiment.”

I also tried the code you mentioned above. Now it does not let me type my responses. I am including a screenshot of the code. Also, I don’t have to use lowercase letters. I just want to make sure that my participants can type their responses.

Thank you so much for your help.

Hey Serena, thanks for trying out the latest version of PsychoPy.

OK those are two separate issues you describe. First, as mentioned above, the experiment appears stuck because the ‘textbox’ stimulus is empty on export for some reason.

To confirm that is the case, I created a fork and gave ‘textbox’ a dummy value. It will now run past that error, but it needs other refinements particular to your design to work fully.

On the second issue, thanks for the screenshot, this looks like an experiment design related matter and my skills on that front are limited.

Have your tried browsing Pavlovia for any experiments others have built in a similar vein? Perhaps @TParsons or @jon are able to step in and help some more :blush:

It could be that a blank Text field is being passed to the textbox as None rather than "", which it doesn’t know how to handle. The textbox is still in Beta so there are still some values like this which it can’t handle yet! I’ll add in some code to treat None as "" in the next release, in the meantime you could try just setting the value of the textbox to be a space or some placeholder text like Type responses here...