ReferenceError: loopRoutineBegin is not defined (nested loops)

Hello,

I am trying to solve this error for a few days and I ran out of ideas what to do. What am I trying to do:
I have two loops, each has 3 routines inside. The meta_pre_eval loop has a conditions file but meta_evaluation loop does not. Stimuli presented in the meta_evaluation loop are previous answers from the participant (not shown in the picture), where they generate between 1-40 answers, which are then shown one by one in the meta_evaluation loop (by specyfing nReps = “tot”, where “tot” is the number of answers generated). I want to present the meta_evaluation loop and meta_pre_eval loop in a random order (some participants get meta_evaluation first and other get meta_pre_eval first), thus I create another loop around them. When I don’t include the the outside loop everything works perfectly but when I do include it then I get the ReferenceError: loopRoutineBegin is not defined.

I tried different things already. Firstly, I tried this: Random routines - #11 by Michael
which resulted in this kind of loop structure:


image
image
image
image

This works locally on Psychopy but gives me the ReferenceError: meta_reloopRoutineBegin is not defined. I tried also specifying the continueReutine = False (see bellow) in the first routin or in all routins within a loop (orders_meta[0] or orders_meta[1]). I also tried to change .thisN to .thisRepN

if orders_meta[0][blocks_meta.thisN] == 0:
continueRoutine = False
else:
continueRoutine = True

Than I tried to do it the way as discussed here Blocks of trials and counterbalancing — PsychoPy v2023.2.0dev1 by creating a “blocks” conditions file. This doesn’t even work locally in Psychopy, I’m not sure what am I doing wrong but the order is always the same.




I also tried including this solution without success (online or locally): Block order randomization - #16 by wakecarter

Finally, this suggestion worked locally in Psychopy but not in Pavlovia: Blocks not randomized in pavlovia - #14 by mmagnuski

Can someone please help me figure this out?