OS: Windows 11 Education 23H2
PsychoPy Version: 2024.2.4
I’m having some issues when converting my experiment to JavaScript for running it online. Each time I try, I get the error invalid syntax (<unknown>, line 1)
(four times per polygon in the Builder file, more on that later). However, despite the error, the JavaScript translation succeeds, my experiment runs fine both locally and online, and it syncs with Pavlovia. This seems odd given the error message.
I didn’t want to ignore the errors in case they indicated an underlying issue, so I systematically disabled components to isolate the cause. It turns out the error disappears when polygons are removed/disabled. To test further, in a version with all other polygons disabled and thus no error messages, I added a new rectangle without any interactions with code components and the errors reappeared. I also ruled out issues with the “Before Experiment” tab or experiment info settings, as disabling polygons alone prevented the error.
To confirm, I created a fresh experiment with only a single rectangular polygon, keeping all default settings. The error still appeared when converting to JavaScript, which suggested some broader issue I am unable to understand. Interestingly, the error does not appear when creating a new experiment which only contains, f.ex., a text stimuli. Has anyone else encountered this, or does anyone know why this might be happening?