| Reference | Downloads | Github

Is trials switch doesn’t work online?

I’m currently working on a PM experiment which loads items into arrays before running the trials. It seems that I’m getting all of the data in the loading loops , despite unchecking “Is trials”. It that a feature that hasn’t yet been implemented in Pavlovia?

You should still get data when not “Is trials” but you shouldn’t get an extra line. e.g. you put a loop of blocks around a loop of trials and untick “Is trials” so that you don’t get an extra line added on each block. I think that works the same both online and offline

This thread is because it definitely didn’t work the same for me. Take a look at

I’ll re-test and post example data files when I have the chance.

_prospective memory_2020_May_20_2313.csv (3.8 KB)

PARTICIPANT_pm_ldt_2020-05-20_23h16.43.342.csv (24.8 KB)

Same experiment a few minutes apart – first one is local, second is online.

Hi Jon, Wakefield is correct about what the current behaviour is supposed to be. The issue of the extra line was more of a bug from historical times. If two loops are nested and both are selected as “is trials”, there is no longer an extra line inserted. In proper “tidy” data format, the number of rows is the product of the number of iterations of both loops, and the outer loop adds extra columns to the shared rows, instead of generating its own rows and breaking the tabular structure.

It is also definitely the case that de-selecting “Is trials” should suppress generating a row of data per iteration of that loop. e.g. a nested loop within a trial that flickers a stimulus 10 times, with only the outer trial loop selected as “is trials”, will generate just 1 line of data per trial, not 10.

So we should ensure that PsychoJS mirrors the current and expected behaviour of PsychoPy.

Wakefield - I think you should report this as a PsychoJS issue at (with a detailed description and a link to this thread):

With some new staff joining the team shortly, there should be a heightened pace of development on the PsychoJS front.

At a code level, what the isTrials flag achieves is it adds in the line thisExp.nextEntry() which essentially causes an advance in the data file to the next line. The outcomes of that extra line depend on context:

  • Applied to a blocks loop (around trials) this has the effect of controlling whethere there’s an extra line
  • Applied to an inner loop of say, stimuli (looping within a single trial) it indeed does what @Michael says, resulting in a factorial combination
  • Applied to a separate loop, which sounds like @wakecarter is using, it should determine whether the data appear on one-line-per-iteration or whether the the data will be inserted just with the final value of the loop integrated into the first line of the next (trials) loop

@TParsons is currently looking into whther the issue is with the Builder code ouptuts (not honoring the isTrials flag during script compile, in which case we can fix it in psychoPY) or whether our outputs are correct but something about psychoJS is then overriding the code (needs Alain’s help)

1 Like

Hi, as I am currently encountering the same issue, I’d like to ask whether you have any idea how to deal with this until it is fixed. The extra lines are somewhat problematic when handling the data… Thanks so much!

Still have the problem !
Not the same behavior online and offline.

Any solution ?

Likewise, I would love to have a solution for this to save me from having to modify participant data manually! For me, the extra lines are less problematic than the not carrying block information across all trial rows, as appears in the csv files generated when running the experiment locally.