I am getting an interesting error while trying to use Unpickler.load()
, here is the source code:
open(target, \'a\').close()
scores = {};
with o
As you see, that's actually a natural error ..
A typical construct for reading from an Unpickler object would be like this ..
try:
data = unpickler.load()
except EOFError:
data = list() # or whatever you want
EOFError is simply raised, because it was reading an empty file, it just meant End of File ..