Experiment works locally but stops after one trial online

I have an experiment created in builder that needs to sequentially cycle through 120 trials with every 10 trials showing a response routine and sometimes as well a break routine. I have a conditions file that has the word, number of reps for the response routine and number of reps for the break routine.

In the response and break routine I have this code:

if responseReps == 1:
continueRoutine = True # Continue with the routine as normal
else:
continueRoutine = False # Skip the routine

Where reponseReps is a variable in my conditions file.

So participants see fixation cross, word, fixation cross, word etc., until there is a 1 and then they see that routine.

This works well locally but online the experiment gets stuck either after the first word or the second fixation cross.

Any help would be appreciated because I cannot see what is causing the problem and it should be quite simple.

What do you mean by “gets stuck”?

See also:

Thanks. I mean that it just doesn’t progress. The screen is blank and nothing moves forward. The code is in the Begin Routine tab.

if pauseReps == 1:
    continueRoutine = True  # Continue with the routine as normal
else:
    continueRoutine = False  # Skip the routine

I just updated it to use the flow rather than code and while it works locally online it stops at the start of the second trial after the fixation cross.

Is the previous routine failing to end? How is supposed to end? If it’s supposed to end when all of the components end, then are there any conditional components which don’t start?

The routine prior to the word routine is fixation cross. This ends for the first trial but then doesn’t for the second one.

So online we see fixation cross, trial, fixation cross and then pause.

I am rebuilding it now from scratch because it is such a simple experiment and hoping that sorts it

Even when I disable everything aside from the fixation cross and the trial. Is there a known issue with delivering sequential trials online?

What version of PsychoPy are you using?

Please insert another routine at the point of issue to confirm whether it is related to starting or ending a routine.

What Begin Routine code is in the second routine? How might it be different the first time from the second?

There is no code but I have been exploring and it is not a blank screen - the “response” routine lasts for 30 seconds and instead of being skipped the elements in the routine are skipped but the routine itself still runs for 30 seconds.

That sounds like a bug from last year that has already been fixed. What version of PsychoPy are you using?

2024.2.4

Have you ticked non-slip timing in the routine settings? That would confuse the situation.

No, sorry! I have really stripped it down and rebuilt it and it is really, really simple! These are my (made up for simplicity) conditions:

words	responseReps	pauseReps	instructions
one	TRUE	TRUE	cry hard
two	FALSE	FALSE	cry hard

What are responseReps and pauseReps? Perhaps they should be 0 and 1.

If that isn’t the solution, please could you add me as a developer to the project and I’ll take a look.

Thank you! I have done that.

I think that the issue is with non-slip timing. Basically, if the routine is green then it will appear for the required duration and can’t be skipped.

Try the following fixes.

  1. Delete the code components from countdown and response_routine
  2. Remove the durations from at least one component in each of those two routines.
  3. Edit the Routine settings to set the durations as 60s and 30s respectively and add == 0 to the skip if conditions.

You currently have routines being skipped if pauseReps == 1 (in routine settings) and ended immediately if pauseReps == 0 (in code).

Thank you! Yes, that works now.