psychopy.org | Reference | Downloads | Github

Pavlovia, "TypeError: event in undefined"

URL of experiment: https://pavlovia.org/Vanda/slider_pilot

Description of the problem:

Hello everyone,

I’ve just started to put together my very first experiment. I have (very) limited knowledge about Python and Psychopy, therefore I am testing everything step-by-step before moving forward to the next chunk of my code/ experiment.
So far, I have a greeting screen with a very direct instruction (“press space”), followed by a screen where two lines appear: on the upper line, a cross is moving “automatically”, whereas, on the lower line, the user can move her cursor (on a given coordinate).
This is so far what I wanted to achieve and to test, I uploaded it to Pavlovia (exported as HTML, then synched my work).
The problem comes when I try to run (in Pilot mode) my experiment: after the first screen (“press space”), I can see the following error message: TypeError: event in undefined
The script works well in PsychoPy. May I ask your opinion on what the problem might be?

I am linking my experiment (see above), it is as spaghetti as it could be.

Thanks for your help in advance!

Sounds like you need event=psychoJS.eventManager; in code_JS as described in my crib sheet (see pinned post).

1 Like

Try this solution for hiding the mouse cursor. If it works for you, I’ll add it to my crib sheet.