我正在尝试打开此.pkl
文件。我不断收到此错误
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 772: character maps to <undefined>
这是我的代码:
import pickle
with open(r"C:\Users\ADMIN\Desktop\Abhishek\STATS Data\test_data_1.pkl ", 'r') as f:
data = pickle.load(f)
print(data)
尝试将编码指定为encoding = "utf-8"
会引发这种情况:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
怎么了?