Can't find source of error with code auto-translation when piloting online

URL of experiment:

Description of the problem:
I am using PsychoPy Builder (v2024.1.5) to create an experiment that shows 8 face images in a 3x2x3 square grid. I have created the majority of the experiment using a code component. (I also have uploaded a conditions excel file in the trial loop.) The experiment is working perfectly when I run it locally but when I try to run it online, I receive the following error message:

I have read through the Python to Javascript crib sheet and the PsychoPy Code Component Snippets documents to make sure I’m not missing something that’s already been answered. I can’t figure out where in my experiment the error is occurring because it’s occurring in the PsychoJS.js script rather than my editable code.

P.S. I have already tried using the Inspect tool in my web browser to identify the issue, which is how I discovered that it’s in the PsychoJS.js script.

What line gives the error?

The line is console.error(error?.reason);

Here’s a screenshot of the Inspect screen in case it’s helpful to see the error message in context:

I just scrolled down your code and realised that you are trying to insert a coder experiment into Builder. Have a look at my RSVP demo (linked here Recording response after current trial loop end) for three ways of how to manipulate image components during a routine.

Builder experiments should not contain “while” loops, core.wait or win.flip for presentation.

Here’s another recent thread where I rewrote a simple experiment to make it more compatible with Builder.

1 Like