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

The print statement was to investigate the error rather than fix it. However, if you are still getting an error related to “contains” when you have no reference to contains in your code then it must be the mouse component itself causing the error.

I know there was a bug in 2024.1.5 which meant it was worse (for me) than 2024.1.4 but I can’t remember what it was. Try setting the version to 2024.1.4 or removing the clickable stimuli and setting the mouse to end routine on any click to test. The latest version 2024.2.4 should be fine.

Are you trying to set a mouse correct answer (in the data tab of the mouse component). I know that can cause this error.

Here are a couple of other threads about this error.

1 Like