【错误解决】UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 840: illegal multibyte sequence

原文来源:https://www.zhihu.com/question/22699590

编码问题错误,读入文件的时候指定编码即可。

with open(fname, encoding='utf-8') as data_file:

原文地址:https://www.cnblogs.com/everfight/p/decode_error.html