Pressing F12 in the browser reveals this error message:
FATAL unknown | {“origin”:“ImageStim.setImage”,“context”:“when setting the image of ImageStim: image1”,“error”:“the argument: Ideogr/nonTUP.png is not an image” }"}
Which I find a bit puzzling because the path to the file seems to be exactly the same, but in the second case it´s not found.
Has anybody encountered this before? from the previous reports I saw the problem was usually missing files or wrong path definitions, but as far as I can tell here it´s not the case.
Dear all, it took me a while but I sort of managed to solve the issue. The only solution I found was to create a mock trial at the beginning of the experiments that has all the images shown each called by its own name (with 0 opacity to avoid them actually showing). After that they seem to be available to be called through the variable definition.
I had a very similar problem, slightly different error message.
The images would not load in, despite the images folder being present in the gitlab directory, the error was something like “image.png is not a resource”. Having tried many other fixes for the issue (changing backslashes to forward slashes, recreating a new directory and pavlovia experiment, etc, the above fix is the only thing that worked.
I’m getting this and cannot for the life of me understand why. I considered it being due to \ instead of /, filenames starting with numbers, resources not added via the Online tab, the conditions file itself being broken/corrupted (and so creating it afresh), but it just seems that pavlovia/js is reading all cells of a row from the conditions.xlsx file as one…
Also, I note from visual/ImageStim.js that this error is due to the image not now being an actual HTMLImageElement… I don’t know what that is though!
@PsyTechMMU it’s hard to know what’s happened without seeing your variables and any code components (maybe you have something that changes the values of your variable or loads them outside the loop)
Regarding the original issue about resources not being found, this is caused by the fact that the PsychoJS script needs to decide which files to fetch from the pavlovia server. It shouldn’t fetch them all (your participant doesn’t want all the other participants’ data files) but it needs to fetch the ones that you’ll be presenting. When you give the complete filename (as in the first dialog and as in your final solution) then PsychoPy can work out what files to download and express them in the script. When you specify the same filename using code (like THESTIMS[1]) then PsychoPy can’t deduce in advance what to deliver to the participant’s browser so the resource doesn’t exist. The way to handle this is using the ExperimentSettings>Online>AdditionalResources to explicitly list files that you’ll need that PsychoPy couldn’t automagically guess.
But I think the most recent post by @PsyTechMMU is something else, and for that we probably need to see the project files
Many thanks for responding, Jon. And apologies for not even linking to the experiment. It’s this one: Pavlovia (GitLab Id: #204560), running (or not) here: symbolLearning [PsychoPy]
Please ignore the text formatting (unless that’s somehow the issue).
Based on the loading bar after launching the experiment, it appears the stimuli/resources are being loaded, but then the conditions.xlsx is being read “wrong”. Perhaps due to @wakecarter’s suggestion (thank you - though I’m not 100% on what you mean and don’t know how to fix it). Also, this error still happens after explicitly adding all resources via ExperimentSettings>Online>AdditionalResources.
This is one generated new from within PsychoPy, but I have also tried (re)creating new xlsx and csv files (and checked for blank columns/rows etc), all still with the error.
They’re part of the PsychoPy-generated template (accessed by clicking the new button beside the conditions file location in the loop dialog).
Also, the “argument is not an image” error occurs with all other versions I’ve tried (fresh xlsx and csv).
The good news is that I can replicate the issue - the bad news is that I have now idea why it would be an issue!
We’ll need Alain for this one. Most conditions files are working fine and I can’t see what’s different about this one. I’ve also converted it to a csv file (which doesn’t have any issue with comments and is certainly correctly formatted) and that fails in the same way.
Cheers, Jon! That puts my insanity at ease for a while at least.
And I’m the same: I’ve been using other experiments/examples with conditions files (and ones more complicated) that are working fine.
Also, I wasn’t convinced it was the issue, but I also tried using .bmp and .jpg files (separately) for the stimuli too, but that didn’t seem to make any difference either. Just thought I’d mention it as another thing it doesn’t appear to be!
Thanks, wakecarter, your help is much appreciated. I had tried that previously and have just tried it again but to no avail.
As mentioned above (referring to visual/ImageStim.js), it seems to me that, even though the stimuli/resources are being loaded, they’re not being “converted” or encoded/decoded or interpreted correctly for some reason. The “for some reason” being the stumper, of course.
Anyway, hopefully this can be fixed or worked around at least!
The issue is that all three columns of the spreadsheet are being used for the image file name as if the contents of all three columns was in the first column. That’s never going to be a valid image file.
Yeah, this is definitely what seems to be happening. And because of this (and it not being a valid image file), it’s throwing this error. So weird it’s happening with this and not others though.