URL of experiment: GNG_Experiment [PsychoPy]
Description of the problem: When trying to run the experiment I run into the error message: “when setting the image of ImageStim: pracImage the argument: is neither an image nor a video” }"
I have an image time called pracImage, which is looking for $pracTarget (set every repeat).
This decision comes from code at the start of the experiment. I have pasted the JS code below (via auto-JS):
pracRows = [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]];
util.shuffle(pracRows);
pracRows = pracRows[0];
pracTarget = [];
pracText1 = [];
pracText2 = [];
pracText3 = [];
if ((pracRows === [0, 1, 2, 3, 4])) {
pracTarget = "Circle.png";
pracText1 = "TRIANGLES";
pracText2 = "SQUARES";
pracText3 = "CIRCLES";
} else {
if ((pracRows === [5, 6, 7, 8, 9])) {
pracTarget = "Square.jpg";
pracText1 = "TRIANGLES";
pracText2 = "CIRCLES";
pracText3 = "SQUARES";
} else {
if ((pracRows === [10, 11, 12, 13, 14])) {
pracTarget = "Triangle.png";
pracText1 = "SQUARES";
pracText2 = "CIRCLES";
pracText3 = "TRIANGLES";
}
}
}
This works fine locally, but not online. I tried to open the console to have a look but it is not showing me where in my JS code it’s going wrong, only where it’s pulling the error message from.