错误:UnicodeDecodeError: 'gbk' codec can't decode byte
原因:文件为utf-8编码,系统却用gbk去解码,必然出现错误。
解决方法:
with open(outpath+ '\\lable0','r',encoding = 'utf-8') as f
错误:UnicodeDecodeError: 'gbk' codec can't decode byte
原因:文件为utf-8编码,系统却用gbk去解码,必然出现错误。
解决方法:
with open(outpath+ '\\lable0','r',encoding = 'utf-8') as f