UnboundLocalError: local variable 'dots_obs_l' referenced before assignment

Hi,

I developed a version of a random dot motion task in Psychopy previously, using a Psychopy version from 2022.
I have updated my Psychopy to version 2024.2.2 and the task is running up until it enters the observation loop.
I then receive this error: UnboundLocalError: local variable ‘dots_obs_l’ referenced before assignment
I believe the past loops I have made are not compatible with the newest version of Psychopy.

What I am trying to do: the loops are set up so that the trials are randomised (i.e. dots_l and dots_r are shown in random order.). I have an excel file which is used to set the conditions. However, I am unsure how to overcome this error and get the trials to run.

Thank you for your help in advance,
Claire





Screenshot 2024-10-11 at 17.14.13

Change the name of the loops. You currently have the name of the loop as the same as the number of times it repeats.

That worked! Thank you very much for your help :smile: