URL of experiment:
Description of the problem:
I am programming a Dot Probe Task, using JS code to randomize the image file name for my image stimulus components “positiveimage” and “negaltimage” . Yet, I keep encountering the same error (see screenshot).
I don’t think there’s a problem with the image file being uploaded, as the programme ran perfectly when I input the file name “images/test_p2.jpeg” directly instead of the variable that is set every repeat. Yet, the error message said that I couldn’t retrieve the value images/test_p2.jpeg when I use my JS randomization code.
Hence, I suspect it could be an issue of the JS code producing a string e.g. “images/test_p2.jpeg” instead of a file path images/test_p2.jpeg.
In case you’re wondering why I don’t just use a conditions Excel file for the image names, it’s because I’m randomizing multiple variables of this experiment – image file, image stimulus position (left/right), probe position (left/right), probe symbol (up/down arrow) – and i won’t be fully counterbalancing all conditions, so I can’t list out all the trials in conditions file. I only input the conditions that I am fully counterbalancing in the conditions file.
Note: this topic title is similar to this, but their solution isn’t relevant for me: Image doesn't appear on Pavlovia when image name is code-generated