解决python3.6使用pickle.load()的编码问题:UnicodeDecodeError: 'gbk' codec can't decode byte 0x8
作者:互联网
问题:
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 0: illegal multibyte sequence
代码:
pkl.load(open(filedir))
此代码在py2.7中无错误
解决:
pkl.load(open(filedir,'rb'),encoding='iso-8859-1')
标签:load,decode,codec,0x80,UnicodeDecodeError,position,open,pkl 来源: https://blog.csdn.net/funny_n_lucky/article/details/88686438