Error when loading image stimuli

Hi all,
I am reposting (original post: in the hope someone might be able to help me with the following issue.

The task presents a series of images of faces. I keep getting error messages like this one attached. In my previous post I referenced the fact that the errors mentioned the RGB colour profile. Since this I created a new sRGB profile Photoshop file - an empty which background - and imported the image files one by one into copies of this standardised background, before flattening the two resultant layers of each file and saving as a JPG.

I was hoping this might fix the issue but with this new set of images I get the same issue pretty much only now the error references Photoshop and the date I saved the new version of the image. I am in the process of trying to narrow down whether this error is appearing at random of only for certain of the 44 image files. But whilst I do that, if anyone has any ideas as to how to fix the problem that would really help. If it is only certain image files that are causing the crashes, I still need to work out how to fix the issue.

Thanks in advance

That error message suggests to me that you have an embedded image on your Excel file instead of just a file name.

Alternatively, the name of your image component or image file variable is also being used for something else. However, this seems less likely if some of the images display correctly.

Thanks @wakecarter - I’m certain it’s not the latter issue. I checked carefully for this. In terms of the first idea, how do you mean ‘have embedded an image in the Excel file’? Sorry, my for limited knowledge.

The Excel file sits in the resources folder, along with the images, and contains a column called ‘stimuli’. An example cell in that column would be ‘resources/p013neutral.jpg’ (without the ‘’ obviously).

I’ve never had any issues with calling images in this way in Pavlovia before now.

I’m still tracking down whether there are particular files that are causing the problem. As you say, it’s odd that it’s just happening on some files and not others. My best guess was that something was embedded in the metadata of some of the image files, that I can’t see in the file metadata as displayed by windows / mac os. I’ll keep fishing, but any thoughts very welcome.

Sorry I can’t share the link for the task. The stimuli are under a data-sharing agreement which means I can’t put them anywhere except in the task presented to our participants.

Try saving the Excel file as a CSV and then open it in a text editor to check for code characters. Try using that file.