UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 10: illegal multibyte sequence如何解决
错误原因:
未指定open函数的编码参数
如何解决
在以下代码块的基础上
fi = open("no.1-data.txt","r")
改为
fi = open("no.1-data.txt","r",encoding='utf-8',errors='ignore')
错误原因:
未指定open函数的编码参数
如何解决
在以下代码块的基础上
fi = open("no.1-data.txt","r")
改为
fi = open("no.1-data.txt","r",encoding='utf-8',errors='ignore')