psychopy.org | Reference | Downloads | Github

TypeError: Set is not a constructor

Does anyone know what this error is about? I don’t even know where to look at to fix it, it was working well online and then when I ran it for the 10th time this message appeared. This is a simple routine, with no coding. It works well on desktop but not online.

Screen Shot 2020-06-18 at 11.39.25 AM

1 Like

I’m going to guess it’s related to the sound component. What does that look like on the inside and in the Excel (if you have sound files named there)?

@wakecarter
Thanks for responding, Here are the screenshots!

Screen Shot 2020-06-18 at 12.50.46 PM Screen Shot 2020-06-18 at 12.50.20 PM

Any idea?

Please send me a copy of your experiment so I can take a look.

Thank you for taking a look. I am attaching here the files for my experiment (https://pavlovia.org/run/laurapissani/cmlp_new/html/), the files where inside folders, but here I could only uploaded the files deparately. I did it again and the error this time was different (see bellow) but still works perfectly on desktop.

sachs-cross-modal-practice.xlsx (11.2 KB)

Screen Shot 2020-06-23 at 5.40.44 PM

CMLP_new.psyexp (12.9 KB)

(the other files were too heavy to upload)

I just ran that file with the console open and your “Set is not a constructor” error is coming from sound_1 = new sound.Sound({

Are you defining your sound in code or via a component? I’ve not managed to define sounds in code.

I used the audio component only, I have not written any code.Screen Shot 2020-06-23 at 6.35.21 PM Screen Shot 2020-06-23 at 6.35.09 PM

Do the files download at the start of the experiment? Are they in the correct folder below html/resources? I think that the message means that it can’t find or play the files.,I’m not sure which.

Yes, they are all in the correct folder under html/Resources, I verified and I even tried with different files, same error when plays online, but not in desktop - in desktop it finds the audios. Do you think the way I saved my name files can interfere with JS coding?

UPDATE: In my conditions file there was a column called “Set” and when I deleted it, it worked perfectly. I am not sure what was happening exactly, since I wasn’t using that column for the experiment, but it was somehow interfering with JS.

1 Like