I have suddenly found this error appearing on a task that I’ve had on Pavlovia for a while. This is a visual search task where participants have to click with their mouse on targets and then click a button that says “Done” to continue.
On the very first trial (and only the first trial), if any of the stimuli are clicked on before the “Done” button appears (after 3 seconds), I get the TypeError. On every other trial, no error occurs.
This is what my routine looks like:
*There are 40 image stimuli, but I didn’t think it was necessary to include them all
The only relevant code component is the DoneButtonClick which has the following in the Each Frame tab:
if t>=3 and MouseResponse.isPressedIn(DoneRectangle, buttons=): continueRoutine=False
I’m mostly confused as to why this only occurs on the first trial. I have tried moving the mouse component to the top of the routine and this hasn’t helped.