If obj.contains(mouse): AttributeError: 'str' object has no attribute 'contains'

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

OS (e.g. Win10): MacOS Sequoia 15.1
PsychoPy version (e.g. 1.84.x): v.2024.1.5
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?: Trying to show 8 images as clickable choices, and then show feedback based on the click of the subject

What did you try to make it work?: It would be easier to show it in a video I believe:

What specifically went wrong when you tried that?: please check the video above, it is short, straight to the point, and shows what I did and the error after
Include pasted full error message if possible. “That didn’t work” is not enough information.
stims.csv (1.7 KB)

This is the csv I uploaded in the loop

The object itself can’t easily be referenced in a spreadsheet. However, you could compare mouse.clicked_name with your spreadsheet value.

I am sorry, I couldn’t understand. So, by the stimulus name you mean 'img_1" …etc, between quotations? I already did that and I got the same error. If I understood wrongly, could you tell me what you meant?

Please show your mouse component and relevant code.

Thanks for your help, that’s my code and mouse component:

Add print(mouse.clicked_name,corrAns) next to your Add Data code to investigate.

I did, got the same error: