Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'list' object has no attribute 'contains' #3651

Closed
meuwl opened this issue Feb 28, 2021 · 1 comment · Fixed by #3656
Closed

AttributeError: 'list' object has no attribute 'contains' #3651

meuwl opened this issue Feb 28, 2021 · 1 comment · Fixed by #3656

Comments

@meuwl
Copy link

meuwl commented Feb 28, 2021

I know, that this error was discussed and closed already, but I can't solve it anyway. (@peircej)

This error message came up during the workshop when a participant running PsychoPy 2021.1 tried to create a clickable button without using the button component (the old `method). (@mdcutone)

That's my error message:

`Traceback (most recent call last):
File "C:\Users\Admin\Desktop\posner\test_lastrun.py", line 157, in
if obj.contains(mouse):
AttributeError: 'list' object has no attribute 'contains'

Experiment ended. #####`

In my case there is only one picture ("image") and one click ("mouse"), but the code still crushes right after first click at any part of screen. I can't code at all and I dont know english good enough to search through pythons' forums so I'm asking for help. If it's possible, describe anything in easy words.

Thanks a lot.

@meuwl meuwl closed this as completed Feb 28, 2021
@meuwl meuwl reopened this Feb 28, 2021
@meuwl meuwl changed the title AttributeError: 'list' object has no attribute 'contains' AttributeError: 'list' object has no attribute 'contains' Feb 28, 2021
@meuwl
Copy link
Author

meuwl commented Mar 3, 2021

BF: Mouse clickables no longer need encasing in [] #3656
Thank a lot, it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant