Unknown resource error: retrieving column from excel within code component

I am trying to have image stimuli appear in my experiment. The way it works is that a code component will access an excel file A to randomly select another excel file B containing a column with the names of my stimuli (.jpg)

The unknown resource error appears for the column of excel file B.

Has anyone encountered this error before and knows an easy fix? Is there suggestions for how to do this without the code component as it seems to be creating a lot of issues.

I already tried uploading all my images to the online repository as additional resources but it did not change anything. When I called the images using $, it gave me the error that the image file variable was undefined. Everything runs locally but the issue is online through Pavlovia.

Hello @a133ya

I have used this approach to select stimuli, and I am still using it. It is most likely a typo or an error in the capitalisation of the file name or extension. Is it always the same file that cannot be found?

Best wishes Jens

Hello. We checked but don’t have typos in the excel or code. however, could you walk us through what you would usually do? as maybe it could be useful to understand what we are doing wrong. Thank you so much!

Hello @a133ya

When I encounter an unknown reference error, I first check for accidental spaces in the Excel file. Then I check the spelling and capitalisation of the file name and file extension. While ‘Filename.Ext’ and ‘Filename.Ext’ are treated alike on a Windows 11 system, they are two separate files on a Unix system. The name you use in your condition file (stimulus1.jpg) must match the filename in filename (stimulus) and extension (.jpg).

see here Wakefield's Daily Tips - #26 by wakecarter

I also turn off randomisation to check whether the error affects one file specifically or all files. If it is the latter, the column name is probably spelled incorrectly.

Does the call from one condition file to subsequent condition file work?

Best wishes Jens

2 Likes