NameError: name 'obj' is not defined

I am building an experiment where participants will be shown a number of different facial expressions, and they are asked to select which emotion is being expressed. The task is able to start just fine, but it always terminates about 5-10 trials in (out of 80) with this error: line 1143, in run
if obj.contains(mouse_2):
AttributeError: ‘str’ object has no attribute ‘contains’

This is very confusing because I never made any object named ‘str’ and I assume it is made by psychopy itself. If anyone could help me out that would be greatly appreciated. I’m not sure how to address this-- any tips are welcome and appreciated!

Do you have anything called obj?