Pavlovia doesn't recognise selected rows

Hello

I have a bit of code at the start to define the trial order to use in the “selected rows”. As this trial order variable is already randomised, I have loopType set as sequential.

My problem is that running the experiment on pavlovia, the trials just run through in the same order as the conditions file (without selecting rows based on my trial order variable). It works fine offline in psychopy.

Does anybody have any suggestions?

Thanks

Pavlovia does recognise selected rows in the form x:y but I don’t know about the order.

Please could you try 1:2,0:1 to see if you get row 2 followed by row 1?

Thanks for your reply. When I try that, I get an “unknown resource” error, saying that the variable I have used to specify the image name is undefined.

I’ve tried a few things out and found that when I input a single number into the selected rows option, the stimuli will load and the single trial runs fine. When I input several numbers (e.g. 1:2,0:1 as you suggested, or even just 1,2,3,4), the stimuli fail to load (the variables are undefined).

I think this is why I’m running into problems specifying the trial order, as my trialOrder variable is a list of numbers corresponding to rows of the conditions file. I’m not really sure how to get pavlovia to recognise the list of trials to run through

I had the same problem. I defined a variable (“trial_sequence”) with a random sequence to run the trials in my excel conditions file, and passed it to the loop option “Selected rows” like “$trial_sequence” (with loopType being “sequential”).

The problem was that the program would randomize the order offline (Python worked), but not on pavlovia (JS didn’t work). It didn’t produce any error messages on pavlovia, but would just present the trials unrandomized as defined in the conditions file.

The solution was to not initialize/define the “trial_sequence” variable with “var” (so not write “var trial_sequence = ;”, but just “trial_sequence = ;”), because it causes the variable to not be available outside its component (as described in TypeError cannot read property '0' of undefined in Pavlovia).