Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 1202: illegal multibyte sequence #3

Open
trra1988 opened this issue Jul 19, 2021 · 0 comments

Comments

@trra1988
Copy link

我运行的时候报这个错误,请问一下是不是因为Python版本的问题,我使用的是python3.8
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File "/home/lin/anaconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 1036, in apply
return self.apply_standard()
File "/home/lin/anaconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 1092, in apply_standard
mapped = lib.map_infer(
File "pandas/_libs/lib.pyx", line 2859, in pandas._libs.lib.map_infer
File "/home/lin/文本分类/Chinese_Spam_Filter-master/Chinese_Spam_Filter.py", line 46, in
self.df['content'] = self.df.path.apply(lambda x: self.getContent(x))
File "/home/lin/文本分类/Chinese_Spam_Filter-master/Chinese_Spam_Filter.py", line 35, in getContent
content = f.readlines()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 1202: illegal multibyte sequence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant