URL of experiment: mh_capstone2022 [PsychoPy]
Description of the problem:
I create a simple auditory priming experiment on the Builder and upload it to pavlovia according the guideline provided in this forum regarding the experiment settings (blank output path, export HMTL set on Sync, uploaded additional resources). However, when turned on piloting stage, the following error pops up:
ReferenceError: Can’t find variable: os
which seems to refer to this line of the js code:
psychoJS.experiment.dataFileName = (("." + "/") + (("data" + os.path.sep) + `${expInfo["participant"]}_${expInfo["date"]}`));
I figured that os
is not a js module, so I just substitute os.path.sep
with a simple "/"
, and that issue is resolved. However, if I test the script again, a similar error pops up:
ReferenceError: Can’t find variable: secs
which refers to this line of the code:
playSound.setSound(audio, secs=-1)
In the API reference of PsychoJS setSound()
does not have a secs
argument, so I just removed it. I re-tested the experiment, and finally this new error popped up:
Unfortunately we encountered the following error:
- when replacing the current sound
- invalid input, need an instance of the Sound class.
Try to run the experiment again. If the error persists, contact the experiment designer.
And here I got stuck. Any solutions? Thanks!