dimanche 24 juillet 2016

Issue with reading an object binary file in python

I am working on binary files in python for the first time. I managed to write an object to a file, but now as I try to read from the file I get this error.

enter image description here

Here is my code:

import pickle 
with open("Account/10000000.obj",'rb')as fp:
    banana = pickle.load(fp);
print banana.balance;

Thanks for an answer in advance!

Aucun commentaire:

Enregistrer un commentaire