问题:
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')
2024-02-19 09:25:04
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')