Conditional excel file not read into nested loop

URL of experiment: spacegame_real_beforemergence [PsychoPy]

Description of the problem:
Hi, I am running quite a complicated experiment that has several nested loops and jumps across routines – therefore I hestiated to post here, because I believe that it might be tricky to describe it fully. Anyway, here it is:

I am reading an excel file into each loop: opt_exp_loop and the loop called exp_loop. Depending on different conditions that need to be fulfilled by the participants, the name of each excel file changes in order to read in a new excel file for the nex time around.
It works out with the inner loop (opt_exp_loop) which calls four stimuli correctly from the correct file.
However, it does not work for the outer loop (exp_loop) even though the correct excel file name is printed into the logfile. This problem only occurs online only but runs smoothly locally. I have tried to integrate the new excel file at multiple instances:

a) at the the ‘checkswitch’ routine in the ‘each frame’ tab
b) in the ‘finish_exp’ routine in the ‘begin each routine’ tab
c) pred_stim_exp in the ‘each frame’ tab

So this means, I am checking stuff in ‘checkswitch’ and according to some conditions met, it should change the name of the excel file for the next time around → which would affect the path for the stimuli that are being read for ‘pred_stim_exp’ routine.

The details of the loops look like this (this is the one not working:)

I would be super helpful for any help as I have been trying to solve this now for a long time. If you need more information or access to the experiment, do let me know.

Thanks,
Nadescha

I wonder if you’d be able to create a “Minimal Working Example” of the problem. Create a new study with just the minimal loops and components needed to demonstrate the issue and share that with us - there’s rather a lot in your full study that we’d need to work through to get to the issue. That would help us help you quicker :slight_smile:

many thanks
Jon