You have a test for equality if target_name == clicked_stim: which appears to never be true.
In the line above add:
print('Does',target_name,'equal',clicked_stim,'?',target_name == clicked_stim)
and check the developer tools to see what happens.
1 Like