URL of experiment: https://pavlovia.org/Yazar8/loop
Description of the problem:
EDIT: The fix is to use “trials” instead of custom names for the loops, however then trialList doesn’t work when I do this.
Seems like the trialList attribute also has some issues. On my main experiment I was using shuffle to put some randomization in place however it threw an error Cannot read property ‘length’ of undefined.
So I hopped in to test why this could be and it seems like there are some bugs with the trial handler overall. For example at the experiment I have provided, which works fine offline, the trialList is “undefined” for the first loop but the trial numbers are reported correctly. For the second loop, the trial numbers are correct but the list is not.
I believe the errors with the trialhandler happens after adding your second loop to the experiment. Not a loop within a loop, but in general adding a new loop to any routine.
- Make a new experiment.
- Add first loop with conditions file, debug the trial number etc.
- Add a second routine with a different conditions file, with a different loop and debug the trial number etc.