TypeError: core.Clock is not a constrctor

Hi. I have problem with running experiment online via Pavlovia. It is a self-paced reading experiment. I can run it successfully on Psychopy. But after I uploaded it on Pavlovia, after the greeting page, I got the warning “TypeError: core.Clock is not a constrctor”.

May I ask for help?

These are my codes:

Python
trialClock = core.Clock()
word_list = Sentences_P.split(’*’)
word_list.reverse() # switch the order
nextWord = word_list.pop()
text_5.setText(nextWord)
text_5.setAutoDraw(True)
event.clearEvents()
rtList3 = []
rtList4 = []
rtList4.append(trialClock.getTime())
trialClock.reset()

Java:
trialClock = new core.Clock();
word_list = Sentences_P.split("*");
word_list.reverse();
nextWord = word_list.pop();
text_5.setText(nextWord);
text_5.setAutoDraw(true);
event.clearEvents();
rtList3 = [];
rtList4 = [];
rtList4.append(trialClock.getTime());
trialClock.reset();

https://run.pavlovia.org/Shiyu_He/spr-experiment-mini/html/

this is the link to my experiment

I think “core.Clock” does not work in Java. Try putting a code component at the very beginning of your experiment and switch it to *Java (JS) with this code:

GlobalClock = new util.Clock();

Then, throughout your experiment, you can use code like this in Python >> JS:

BaseStartTime = GlobalClock.getTime()

Hello hollysully,

Thank you so much for your code assist! My inquiry was regarding the continueButton function but thank you anyways!

I was redirected by another fellow about the Python to JS crib sheet (PsychoPy Python to Javascript crib sheet) which aids in programming language translation. Perhaps this may be of aid to you as well!

Many thanks once again. All the best.

Marie