I have a typical experiment with a “trials” loop. Within this loop are a few routines: one for presenting a fixation cross, then one for presenting stimuli, then one for entering a response, then one to present feedback. All pretty standard, I should think. In case it matters: the timing of most elements (e.g. stimuli) in these loops is variable across trials, and the loop is advanced to the next trial by a key press (i.e. not on a timer).
I want to save some important data about the events in the ‘trials’ loop, including the start and end times of the stimuli, the response times, etc. Accordingly, I’ve checked the “save onset/offset times” boxes and so forth in the Builder, and when I run the experiment locally, it works fine: the resulting CSV files include all the variables that I want (e.g. digit0.started & digit0.stopped, for the presentation times of a stimulus called ‘digit0’).
However, when I run the experiment online, all of the information about stuff from the ‘trials’ loop disappears. The only data that is saved is from the start and end routines that come before and after this loop, plus the data that was in the conditions file. Columns like ‘digit0.started’ are no longer present.
I’m really puzzled, since I figured this is nothing to do with custom code components or anything “exotic” like that. These seem like standard features handled through the Builder so I’d expect them to work pretty painlessly (and not be subject to my own dumb errors…).
Any ideas about what might be causing this? This post seemed similar, but adding a .nextEntry statement to my code didn’t solve the issue for me (unless it put it in the wrong place? I added it to the end of the ‘trials’ loop). I also verified that the ‘is trials’ box was checked for my loop. Changing the name to something more distinct (‘trials_loop’) didn’t help either.
Edit: I did notice that the .py code generated by the Builder has a bunch of .addData statements for the variables I want (e.g. ‘digit0.started’), whereas the .js code doesn’t have any such code. So I guess the question is: why doesn’t it? Is this normal - am I supposed to add these statements manually in order to save data online?
Edit2: I replicated the problem in a much simpler dummy experiment that only contains a trial loop with two polygons being presented on each trial, with fixed timing. Locally, stimulus presentation times are saved. Online, again nothing.