# Mouse attribute error

**URL:** https://discourse.psychopy.org/t/mouse-attribute-error/4698
**Category:** Builder
**Created:** [June 15, 2018, 1:14pm UTC](https://discourse.psychopy.org/t/mouse-attribute-error/4698 "2018-06-15T13:14:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Marije\_Soto](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/marije_soto/32/2591_2.png) [@Marije\_Soto](https://discourse.psychopy.org/u/Marije_Soto)
#### Post date: [June 15, 2018, 1:14pm UTC](https://discourse.psychopy.org/t/mouse-attribute-error/4698/1 "2018-06-15T13:14:13Z")

</div>

Using  
Win 10 PsychoPy v.1 90.2 standalone

I’m trying to set up a mouse click response for a screen with 3 image options, on which participants have to select one by clicking on the mouse

I tried to use the response option mouse, but i didn’t really understand how to complete the last two parametres: clickable stimuli$ (do I complete with one of the headers of my stimuli list in excel; and if so, with or without the dollar sign?), store parameters for clicked dollar sign: ? )

Also, when I tried to run the experiment, I got an error message, and the experiment was terminated before running all of it:

in   
if obj.contains(mouse):  
AttributeError: ‘unicode’ object has no attribute ‘contains’

I tried generating a script and substituting contains for find. That did not fix it, but, sincerly, I understand little of coding.

Any help would be greatly appreciated.  
Thank you!

Marije

---

<div class="post-metadata">

### Author: ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)
#### Post date: [June 16, 2018, 2:49am UTC](https://discourse.psychopy.org/t/mouse-attribute-error/4698/2 "2018-06-16T02:49:54Z")

</div>

Hi Marije, I think the issue here is that you are using variable names from your conditions file in the “clickable stimuli” field. That field needs to contain the names of your actual stimulus components (i.e. your 3 image components). Those image components will then be checked to see if a mouse click has occurred in them.

At the moment, it seems like you are using a variable from your conditions file, which just contain a string of characters. A string of characters (represented as Unicode text) isn’t a stimulus that exists on screen and hence can’t have a `contains()` function to see if it has been clicked in.

The “store parameters” setting is how you know what stimulus was clicked. It probably defaults to `name`, which tells you the name of the component that was clicked (e.g. `image_1`). That may or may not be sufficient for you to judge if the response was correct. e.g. it might be useful for you to add `image`, which will give the name of the file being displayed by that component (e.g. `dog.png`).

No, you don’t need to use a `$` prefix: the presence of the `$` in the field label tells you that this field will automatically be interpreted as code, rather than literal values.

---

<div class="post-metadata">

### Author: ![Marije\_Soto](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/marije_soto/32/2591_2.png) [@Marije\_Soto](https://discourse.psychopy.org/u/Marije_Soto)
#### Post date: [June 16, 2018, 4:38am UTC](https://discourse.psychopy.org/t/mouse-attribute-error/4698/3 "2018-06-16T04:38:26Z")

</div>

Yep! Did the trick.  
Thank you so much for taking the time to explain.

Best, Marije
