There are a few reasons for this: Firstly, I find this the easiest way to put data from all participants into a single file for subsequent data analysis in SPSS. The reason I like to do this for each block rather than the whole experiment is that then I only get data for the main trials of interest and also if participants don’t complete the task (I work with children so this happens quite a lot) then I still get some data.

Thanks, that’s useful advice.

I put thisExp.saveAsWideText() at the end of the experiment and it works. It’s not as good for me as saving at the TrialHandler level but at least it’s putting everything into one file for those that complete the experiment.

This is all a bit mysterious, as you shouldn’t actually need to explicitly call thisExp.saveAsWideText() at the end of the experiment, as this should happen automatically as long as you set saveWideText=True when creating the ExperimentHandler.

If the experiment ends normally (even if it terminates early) the data should be saved. The only exception would be if you exit the experiment by pushing the red ‘stop’ button. If you terminate in a more civilised fashion (e.g. end early in response to the escape key, and then call core.quit()), then the normal housekeeping will occur.

None of this addresses your issue with the calling .saveAsWideText() from the TrialHandler though…