If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): MacOs Monterey
PsychoPy version (e.g. 1.84.x): v2021.2.3
What are you trying to achieve?:
I intend to skip one routine within a loop in my trial conditionally on a variable that I defined in my excel file. This variable can either be 1 or 0 (so basically skip vs. don’t skip routine). I am trying to run the experiment online via local debug mode. Here I run into problems. However, running the experiment offline works perfectly fine.
What did you try to make it work?:
I added a customised code component and set the following in the begin routine (and also “Each Frame”) section:
if myVariable == 0:
continueRoutine = False
I tried to play around with the Code Type as well. I have already tried to move my code to the “each Frame” sheet, but this does not change anything.
What specifically went wrong when you tried that?:
It works perfectly offline, however, when I try to run my experiment online, 2 things happen:
The routine is not skipped as expected and the loop seems to be stuck in one row of my excel file that gets shown over and over again. It does not seem to iterate through my excel file.
I am attaching screenshots of my conditions file, my flow and my code component.
I would appreciate your help immensely! Thanks in advance!