Loading

python 读取文件时报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 205: illegal multibyte sequence

python 读取文件时报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 205: illegal multibyte sequence

学习了:https://www.cnblogs.com/mengyu/p/6638975.html

解决办法1.

FILE_OBJECT= open('order.log','r', encoding='UTF-8')

解决办法2.

FILE_OBJECT= open('order.log','rb')

 

posted @ 2018-05-27 10:25  stono  阅读(287)  评论(0编辑  收藏  举报