标签:color 错误 users buffer ram logs div module sel
Traceback (most recent call last): File "/Users/c2apple/PycharmProjects/easyToPython/fileMethod.py", line 94, in <module> line=fp.readline() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xef in position 99: invalid continuation byte
出现这种情况是由于读取后进行转码出现错误,遇到了非法字符,解决的方法是检测读取的文件编码,再进行下一步转码形式处理
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 99: invalid continuation byte
标签:color 错误 users buffer ram logs div module sel
原文地址:http://www.cnblogs.com/cmnz/p/6978742.html