UnicodeDecodeError: 'gbk' codec can't decode byte 0xfc in position 4724: illegal

nova_fly 2017-12-01 09:54:28
G:\python3.6.3\python.exe "F:/新建文件夹 (2)/情感分析/4.py"
Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\ADMINI~1\AppData\Local\Temp\jieba.cache
Loading model cost 0.912 seconds.
Prefix dict has been built succesfully.
Traceback (most recent call last):
File "F:/新建文件夹 (2)/情感分析/4.py", line 107, in <module>
text = f.readline()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xfc in position 4724: illegal multibyte sequence

Process finished with exit code 1

python运行一半就遇到这个问题,求大神指导~~(指明打开文件的编码方式、改变文件路径的方法都试过了没用啊)
...全文
979 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
khookai 2017-12-03
  • 打赏
  • 举报
回复
遇到了一模一样的情况:)

2,209

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 其他数据库
社区管理员
  • 其他数据库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧