Error message appears - Run the study on line

I have created several tasks on psychopy and when I want to “run the study on line” an error message appears.

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1240, in onPavloviaRun
self.fileExport(htmlPath=self._getHtmlPath(self.filename))
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 719, in fileExport
target=“PsychoJS”)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
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:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 252, in writeScript
self_copy.currentRoutine.writeEachFrameCodeJS(script, modular)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\routine.py”, line 329, in writeEachFrameCodeJS
comp.writeFrameCodeJS(buff)
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\keyboard_init
.py", line 310, in writeFrameCodeJS
“Variables for allowKeys aren’t supported for JS yet”)
psychopy.experiment.utils.CodeGenerationException: Variables for allowKeys aren’t supported for JS yet:

And everything is blocked, psychopy doesn’t propose me to create a new project and I can’t synchronize my task in an already created project either.

Thanks for your help.

1 Like

Hi There,

It looks like you are trying to use a component that isn’t yet implemented in JS (So can’t run online) have you checked that all of your components are supported online? https://www.psychopy.org/online/status.html

Thanks,
Becca

Thank you for your prompt response.
I only use text, images (.jpg format), music (.wav format), keyboard for the space key and mouse.
I even replaced all the ratings scale with mouses to be able to put my task online.

Thanks,
Clémence

Hi there,

OK that sounds doable online! Please can you share the URL to your project (view code from pavlovia and send that URL, the project may need to be public for us to view it)

Becca

Hi,

As I can’t upload my task, I don’t know if I have a URL. Where can I find it?

Thank you!
Clemence

Ah ok I see now. To help pinpoint the issue more are you able to upload other tasks or is it just this one?

Surprisingly yes, my training task works while it uses the same images, sound etc.
But I’m wondering, does each task have to be in a different folder on my computer?
Because all my tasks, except my training task, are in the same document.

Thank you very much for your help !

I always put different .psyexp files into different folders for running online. I think there is a way to have multiple experiments in the same folder, but that’s not something I’ve explored.

Thank you for the advice.

I put all the experiments in separate folders but when I try to run the study online I always get the same error message.

Hi,

It’s good my task works online !
The component “keyboard for the space key” was not working online and blocked everything.
Removing it all works.

However, I don’t know how to make my participants answer if I don’t use the keyboard anymore.
What kind of answer should I choose when I want them to answer yes or no to a question?

Thank you very much !!

When you say keyboard for the space key, do you mean you had a keyboard component where ‘space’ was the only allowed key? If so, you should put [‘space’] instead.

So that’s why it didn’t work!
Thank you very much !!! :slight_smile: