1👍
✅
Based on the behavior you’re describing, I bet the file pointer is at the end because you just explicitly called the storage.save()
function. By reading a file twice, you’ll get nothing.
f = StringIO.StringIO('foobar')
f.read() # out 'foobar'
f.read() # out ''
f.seek(0)
f.read() # out 'foobar'
Source:stackexchange.com