Your error
argument 4 has unexpected type 'NoneType'
is referencing the fixed = ['dateStr']
argument in the gui.DlfFromDict()
function.
Essentially, it isn’t finding your key ‘dateStr’ in your expInfo dictionary, which means that the data.getDateStr()
function isn’t returning anything, so the ‘dateStr’ key isn’t being created in the first place. To check, run:
expInfo['dateStr'] = data.getDateStr()
print data.getDateStr()
print expInfo.get('dateStr')
and see what is returned. I don’t know where the .getDateStr()
function comes from, but an alternative would be to use datetime64 objects from numpy.