Data not saving -

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.