pycharm文件报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 6892: illegal multi...

最终解决方法:
(1)在所有open的地方添加encoding=“UTF-8”,设置编码方式
将open(“path”)修改为open(“path”,encoding=“UTF-8”)------测试可用
(2)以二进制形式打开,with open('path','rb') as f----未测试
(3)忽略:open("path', encoding="UTF-8",errors='ignore') as f-----个人认为不可取,在后面容易出错
究其原因:待查询

你可能感兴趣的:(pycharm文件报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 6892: illegal multi...)