Data not saving -

Title: Data not saving on Pavlovia – only some participants’ data are recorded

Problem description
Hi everyone,

I’m running into an issue with data saving in a task hosted on Pavlovia (built with PsychoPy / PsychoJS). During the first phase of recruitment last year, the task ran smoothly — apart from the usual minor bugs (e.g., participants not waiting for the task to fully load, or reloading the page too early).

However, in the current second phase, most participants appear to complete the task without any visible errors, but their data never get saved to the Pavlovia server.

More details:

Details:

  • The “Save incomplete results” option is enabled.
  • The task was in Running mode when this issue occurred. I’ve temporarily switched it to “Piloting” in hopes of diagnosing the problem.
  • Only 3 participants have successfully generated full data files during this phase.
  • At least 9 participants completed the initial Dexero form (which redirects to the Pavlovia task), meaning they very likely reached the beginning of the task. Of those 9, only 3 have data files saved on Pavlovia. I personally received email confirmation from 2 other participants who said they completed the task from start to finish — yet no data file was generated for them (they are not among the 3 whose data were successfully saved).
  • Note : Before switching to pilot mode, I deleted empty files in the data/ folder to free up space, and attempted to update the Excel files in the resources/ folder (added/replaced stimulus lists), then reverted everything to the original setup. Maybe those are the causes of the current problem ?

Things I’ve tried so far:

  • After switching to pilot mode, I added psychoJS.experiment.save({ attributes: psychoJS.experiment._trialsData }); at mid task and almost at the end of the task.

Any suggestions would be hugely appreciated !
Thanks in advance !
– Clémentine

I suspect that this code is causing the issue. Why did you add it? Have you tested it? Specifically, code trying to save data which is still running when the experiment ends could conflict with Pavlovia’s own attempts to save your data.

Thank you very much! I think you’re right — the issue likely comes from participants quitting the task too quickly. I was relying too heavily on the “save incomplete results” option to capture the data even if they exited before reaching the actual end of the task. I don’t really understand this option.

I’ve now updated the final message to instruct participants to press the space bar and wait until they see the green confirmation box before closing the task.

Oh, and that line psychoJS.experiment.save({ attributes: psychoJS.experiment._trialsData }); was just a naive attempt to fix things — courtesy of ChatGPT !

Have a great day and thanks again for your quick response !