psychopy.org | Reference | Downloads | Github

"Generating PsychoJS script..." creates an empty HTML folder

Hello, I have been trying to “Export HTML” the experiment that I made on builder so that I can upload it to Pavlovia. However, it keeps making empty HTML folders. All it has in it is a “resource” folder which is also empty. I am not sure what to do?

It is now giving me this error:

Generating PsychoJS script…
Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 2437, in generateScript
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 188, in compileScript
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 160, in _makeTarget
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 216, in writeScript
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/experiment/components/settings/init.py”, line 529, in writeInitCodeJS
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/experiment/components/settings/init.py”, line 524, in prepareResourcesJS
File “os.pyc”, line 210, in makedirs
File “os.pyc”, line 210, in makedirs
File “os.pyc”, line 220, in makedirs
PermissionError: [Errno 13] Permission denied: ‘/Users/Users’

It looks to me like your experiment is in a folder where you don’t have write-permissions, or you’re trying to export it to a folder where you don’t have such. What is the location of your experiment on the disk?

The experiment is on my desktop. This started happening because I had exported the HTML once then I made a new project and deleted the old HTML for the old experiment. It then started exporting the empty HTML and gave me no errors in would just say “Generating PsychoJS script” but it didn’t. Then. I tried deleting PscyhoPy from my computer and re-downloading it and now it is giving me this error and still exporting the empty HTML. Maybe this extra info helps?

OK. Don’t put your experiment on the desktopand the sync it with Pavlovia. We need to insert some checks for that to make it not possible and give you a warning.

There are two possible problems:

  • This might be on a university networked machine where the desktop is actually some university roaming account (the files in the desktop are stored on a server somewhere else) and have different security settings.
  • but also, when you sync an experiment with pavlovia is syncs the entire folder (so as to catch your stimulus files and conditoins files as well) but that means your entire desktop and all contents are being synced with the server!

Move your experiment files to a inside a folder in your documents (or dropbox or similar) away from the desktop

Okay thank you! putting it in a folder in my Documents fixed it. Now, I put in on Pavlovia and it’s all great except for at one point in my experiment I want to have participants fill in answers and get a text feedback. It works fine on the builder, but then on Pavlovia it says this :

Could I fix this?

this is the link to the experiment too:
https://run.pavlovia.org/mariamohamed/458-project/html/?__pilotToken=3c59dc048e8850243be8079a5c74d079&__oauthToken=a528ca9c394d216ff6e23c1dce870ecbb104ef3cd77b71e446ebf5014d2b940d

@Maria_T_Mohamed, this is an error with your use of the join function on a string in your custom JavaScript. You can join elements of an array using this method, but not a string. You could use the concat function instead:

''.concat("join", " ",  "this")

For more info, see https://www.w3schools.com/jsref/jsref_concat_string.asp

Thank you so much! that fixed it. my experiment works now (: