Randomizing loops within and between loops

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

Win10
v2022.2.5

As a new user PsychoPy does not allow me to attach more than two images in the post but I can attach more in the comments if there are questions.

I am trying to build an experiment that goes through four tasks. Both the stimuli in the tasks and the four task loops themselves should be randomized so that each participant will see a different task order.
image

I have an overarching loop encompassing the four smaller loops that each have stimuli inside. The large loop is tied to an excel sheet with the four task names inside and each given a number (1,0,0,0 - 0,1,0,0 - 0,0,1,0 - 0,0,0,1).

The smaller loops are each tied to their respective excel sheet containing their stimuli.

The program fails to start and doesn’t have an error message. It does say that it cannot find one of the stimulus lists in the following message:

File “C:\Users\dmaier\Desktop\Senior Project\Exp A_lastrun.py”, line 345, in run
text=CatImA,
NameError: name ‘CatImA’ is not defined
ioHub Server Process Completed With Code: 0
################ Experiment ended with exit code 1 [pid:15324] #################