When reading a file with this code faced error:
with open("hist", "rb") as f:
hist = pickle.load(f)
hist = pickle.load(f)
Error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 3582: ordinal not in range(128)
When reading a file with this code faced error:
with open("hist", "rb") as f:
hist = pickle.load(f)
hist = pickle.load(f)
Error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 3582: ordinal not in range(128)
Try setting the encoding while load.
Ex:
hist = pickle.load(f, encoding='utf-8') #or'latin1' or 'bytes'