URL of experiment: Pavlovia
Description of the problem: This is my first time trying to export a PsychoPy experiment to Pavlovia. The experiment works fine from the PsychoPy console, but when I try to run it online, it is stuck on the initialization screen.
I know randomization is an issue when generating the JS files, so I wrote an admittedly clunky randomizer for the JS version:
ThisStim = Math.floor(Math.random() * 2);
if ((ThisStim === 0)) {
StimSet = “train/train_stimfile_VB_1.xlsx”;
} else if ((ThisStim === 1)) {
StimSet = “train/train_stimfile_NV_1.xlsx”;
} else if ((ThisStim === 2)) {
StimSet = “train/train_stimfile_VB_2.xlsx”;
} else if ((ThisStim === 3)) {
StimSet = “train/train_stimfile_NV_2.xlsx”;
} else if ((ThisStim === 4)) {
StimSet = “train/train_stimfile_VB_3.xlsx”;
} else if ((ThisStim === 5)) {
StimSet = “train/train_stimfile_NV_3.xlsx”;
} else if ((ThisStim === 6)) {
StimSet = “train/train_stimfile_VB_4.xlsx”;
} else if ((ThisStim === 7)) {
StimSet = “train/train_stimfile_NV_4.xlsx”;
} else if ((ThisStim === 8)) {
StimSet = “train/train_stimfile_VB_5.xlsx”;
} else if ((ThisStim === 9)) {
StimSet = “train/train_stimfile_NV_5.xlsx”;
}
}
StimSet = infile;
psychoJS.experiment.addData(“StimSet”, StimSet);
However, either this fix didn’t work or there is another issue with the JS file that’s preventing the experiment from running. I don’t have much experience working with JS, so I’m not really sure what other issues could be causing this.