Data not saving csv or xls (semi-solved)

OS: OSX
PsychoPy version: 1.84.4
Standard Standalone? (y/n) : y

What are you trying to achieve?:
I noticed that my experiment was no longer saving data in .csv or .xlsx format, but only in .psydat and .log format. I’m trying to make PsychoPy save things in .csv and .xlsx again.

What did you try to make it work?:
I’m new to PsychoPy. I tried going back to the basic Stroop task (https://www.youtube.com/watch?v=VV6qhuQgsiI), something that’s saved data as csv. in the past for me, and even then, csv. and xlsx. files were no longer being saved, although I haven’t touched the code for that; I’d only made that in builder view. I thought it might be an issue with the program instead, so I tried reinstalling PsychoPy standalone, and it didn’t work.

I checked my data settings under experiment settings (Experiment settings — PsychoPy v2023.2.3), and they appear as in the screenshot below.
32 PM

What specifically went wrong when you tried that?:
There was no error message. Things just aren’t saving…

I went to coder view to see what the code looks like for saving data. I think this is the relevant part, but I’m not sure if anything is wrong with it.

save data for this loop

trials.saveAsExcel(filename + ‘.xlsx’, sheetName=‘trials’,
stimOut=params,
dataOut=[‘n’,‘all_mean’,‘all_std’, ‘all_raw’])
trials.saveAsText(filename + ‘trials.csv’, delim=‘,’,
stimOut=params,
dataOut=[‘n’,‘all_mean’,‘all_std’, ‘all_raw’])

these shouldn’t be strictly necessary (should auto-save)

thisExp.saveAsWideText(filename+‘.csv’)
thisExp.saveAsPickle(filename)
logging.flush()

make sure everything is closed down

thisExp.abort() # or data files will save again on exit
win.close()
core.quit()

It seems I’m experiencing a similar problem on OSX with PsychoPy version 1.85.4. Specifically, the issue seems to be that the csv file does not auto-save (i.e., the csv output file is not there when I press escape). When I complete the experiment, however, the csv file is created.

As I find auto-save quite useful, is there a way to reinstate it?

Jan

P.S. I just tested the same experiment with 1.84.1. With this version, the csv file is auto-saved.

1 Like

Hi Jan,

Thank you for helping me look at this. I hadn’t realized that this was an issue of the 1.84.4 version of PsychoPy. I’ll try using 1.84.1 instead because I too find auto-save useful.

Best wishes,
Brandon