原文:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position 0: invalid start byte问题出现

.上一篇聚类时碰到的问题 显示这行读取编码问题: fr open filePath, r .源码添加了encoding utf 好吧,人家就是说这个不行 没仔细看报错 .编码给 gbk TypeError: an integer is required got type str .仔细看看open .最后格式 fr open filePath, r , , gbk 成功读出汉字了 ...

2020-06-08 19:11 0 3729 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM