Randomsization of stimuli

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version (e.g. 1.84.x): 2023.2.3
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
Randomising trials, I have two small loops, one with video stimuli, one with image stimuli and I am trying to randomise between the loops
What did you try to make it work?:
I added code to the small loops and a randomisation file to the big loop
What specifically went wrong when you tried that?:
When I added the code it started coming up with this error:
UnboundLocalError: local variable ‘dynamic_loop’ referenced before assignment
################ Experiment ended with exit code 1 [pid:13376] #################

Having looked at other peoples errors it says its because it cant access the stimuli files, but before I added the code to randomise the trials, it all worked fine and could access the stimuli ect.

If anyone knows how I can fix this pls help me :slight_smile:

Do you have a loop called dynamic_loop?

Do you have any custom code that refers to it that isn’t within it?