Connecting excel files for image selection

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. mac11.4):
PsychoPy version (2021.2.3):
Standard Standalone? (y) If not then what?:

What did you try to make it work?:
I have a loop that randomly selects a category of images but within each category there are multiple images that I’d like psychopy to also select randomly. In the stims.csv file, the object column is the categories. Each row in that column is a different list of images. I would like to randomly select an image from whatever list is randomly selected.
stims.csv (732 Bytes)

What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.

OSError: Found file ‘plants.csv’ [= /Users/troyhouser/Documents/plants.csv], failed to load as an image

You point the loop at the CSV files.

The image should be the name of the image file name column in the spreadsheet.

The image is the name of the column of lists, from the stims.csv file. I tried to point it to the column header of the file that it selects, e.g., the animals.csv file col header is obj_animals, and so, in the stims.csv file the row corresponding to that file is animals.csv/obj_animals, but it says image cannot be found.
I’m trying to point the loop at a csv file entry that in turn points to another csv file that contains a list of images, one of which is randomly retrieved.
stims.csv (937 Bytes)
animals.csv (880 Bytes)

Your object column in stims.csv won’t work. It should be just the name of the CSV file.

I would recommend that you use the same column title in all of your object CSV files.