Online error "_Blank_ is not a constructor"

URL of experiment: DietCognitions SONA [PsychoPy]

Description of the problem:
Hi. I am not an experienced coder. I coped a task that works online exactly as is onto my task. I am getting the error “core.Clock is not a constructor”. Please help. Thank you in advance.

As per my crib sheet core.Clock() should be manually translated to new util.Clock()


I have replaced “core.Clock()” with “util.Clock()” and the problem persists. Thanks.

Your experiment still contains

timing = new core.Clock();

Hi, I have looked through all of the codes that are implemented in this task many times and I do not see it there. I attached two screenshots where it has the new code. I made sure this was synced with the online version and the problem persists. Thank you.

You are showing a Python (Py) code component. Switch it to Auto to create the JS and then to Both if you need to edit the JS.

Thank you for the help, that solved that issue. Now I get this error.

Have a look at the Developer console to see the line giving the error.


It looks like this is causing the error. Thanks.

Do you have any idea how to solve this error?


Try removing np.NAN since numpy doesn’t work online.

What I do is remove and replace lines a few at a time to narrow down the error.

1 Like