I’m trying to build an experiment with a mouse response. There are two text fields that are automatically generated from the excel list. People hear a sound and have to click on one of the words.
So far that works, but once I test the experiment and click on one of the words, it exits. I’ve tried pretty much all the settings there are for the mouse response, without success.
This is the error message that I get:
if obj.contains(mouse):
AttributeError: 'str' object has no attribute 'contains'
I think this may be that you have entered some clickable stimuli into the mouse component, and one or more of those clickable stimuli are a string, rather than a clickable object.
Yes, thanks. option1 and option2 are strings, imported from your conditions file. You can change this to the actual text components option_1 and option_2 (text components are objects) and you should be able to click the text on screen .
That will be related to using ‘option_1’ in the store params field. You might instead want to store its name, so use name instead in the store params field, and the name of option_1 (or 2) will be stored.
Hello, I was wondering if you knew why this error happened?
I am getting the same error:
if obj.contains(mouse):
AttributeError: ‘list’ object has no attribute ‘contains’
I am making the corsi task in psychopy. It is working by itself, however when i add it to a group of 3 other tasks only the corsi seems not to work and i get that error. I have copied what i did exactly but cant seem to figure out why it ‘clashes’ with other tests…
Hello! I have commas after the clickable stimuli but i still get the same error unfortunately. I put a comma after the last clickable stimuli to see if that worked but that did not work either. I also tried adding a comma after ‘name’ and that did not work either