Data Loss in PsychoPy

I recently ran a PsychoPy script which had the escape button disabled to disallow participants from doing it themselves so when it came to end of the script, the last message popped up and it would not stop the script. Note that the “finish” was set to infinite. I tried to quit using the Apple quit commands but when that did not work, we actually hit the power button to kill the program and restart the script. Needless to say, the data did not save to a CSV file like it normally does. It did start a log file but there is nothing in that log file.

Is there a way to retrieve the data or is it lost permanently? Does PsychoPy save the data somewhere that is accessible?

No, I’m afraid if you have to resort to force-quit then data will be fully lost (as at version 1.85). If you expect to have issues with this in future then you could add the following into a Code Component to be executed when timing is not critical (i.e. an inter-stimulus interval):

logging.flush()

and that will cause the log files to update with any data since last flush (but won’t update csv files or anything like that)