Wakefield's Daily Tips

Data filenames

The format of the data filename is set in Experiment Settings / Data, with the default as:

u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])

Be very careful if you change this or the name of the participant field in the expInfo dialogue box. If the data file name tries to access a key that does not exist in the expInfo dictionary, you will get a key error locally but online the missing element will be replaced with “undefined”. If the resulting data file name matches an existing one, the existing data file will be overwritten. This doesn’t usually happen, because expInfo['date'] gives the starting time to the nearest millisecond. If, however, you remove expInfo['date'] from the filename AND have no unique values (either by design or errors resulting in values being replaced with undefined) AND don’t stop the issue during piloting then you may still be able to retrieve data by looking at the commit history for your repository.

N.B. Dictionary keys are case sensitive so expInfo['participant'] is not the same as expInfo['Participant'].

1 Like