l'm using python3.6/ . l pickled my file using protocol=pickle.HIGHEST_PROTOCOL
when l load it as follow :
with open('data.sav', 'rb') as handle:
data = pickle.load(handle)
l get the following error :
File "<stdin>", line 2, in <module>
_pickle.UnpicklingError: pickle data was truncated
What is wrong ?
It's been a while and maybe you have already found a solution.
In my case, the issue was due to the pickle file being corrupted. You could try to check the file's integrity with sha256sum, md5sum or something similar.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With