Cannot seem to fix js file for online experiment

URL of experiment: Wisconsin Card Sorting Task [PsychoPy]

Description of the problem: Hello again, i am going crazy trying to debug the js file for the online experiment. I tried to edit the js file both with a notepad and from the psychopy coder, what’s more i keep having the same 2 errors back to back: i fix the “caught SyntaxError: Unexpected token ‘}’” by removing the “}” with a notepad and in the coder, saving the file and reuploading to pavlovia, but then i get “Uncaught SyntaxError: Unexpected end of input”. When i tried to fix this last error and runned again the experiment i got again the first error message. What’s the problem, what am i doing wrong?

Please could you upload a copy of your Builder file and I’ll take a look there.

META-WCST.psyexp (128.8 KB)

This is the builder file i am using

Try without data.getDateStr(“%H:%M:%S”)

Also, I now recommend textboxes instead of aligning text in code.

Thanks i will try this solution and update you if it works!

It keeps outputting this error message “Uncaught SyntaxError: Unexpected token '}” in my js file

Have you tried an incognito tab?

I note that the link in your first post doesn’t work any more. Have you created a new repository?

I set it again to pilot before committing the changes, sorry heres the link: Wisconsin Card Sorting Task [PsychoPy]

By the way i tried opening it with an incognito tab and got the same error again. It seems theres a “{” that should not be in the code, and opening the js file with a notebook i can see it is indeed out of place in that line. Fact is i don’t know how to fix this besides editing the js file itself

Edit: Also when i try to open the js file without a notepad i get a message saying theres a syntax error in the first line of it. I checked and there was an “import” statement, but i read js doesn’t have “import”. Might this be the cause of all these problems? The aforementioned line its import { core, data, sound, util, visual, hardware } from './lib/psychojs-2024.2.4.js';

And before that i have something like:

/************************************

  • Wisconsin Card Sorting Task *
    ************************************/`