Python文件读取报错 UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 9: illegal multibyte sequence

源代码:

fo = open("***.csv","r")

报错:

技术分享图片

解决方案:

fo = open("***.csv","r",encoding=UTF-8)

 

文章来自:https://www.cnblogs.com/legoxz/p/8511542.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3