=================================版权声明=================================html
版权声明:原创文章 谢绝转载
python
请经过右侧公告中的“联系邮箱(wlsandwho@foxmail.com)”联系我编码
勿用于学术性引用。spa
勿用于商业出版、商业印刷、商业引用以及其余商业用途。 code
本文不按期修正完善。
htm
本文连接:http://www.cnblogs.com/wlsandwho/p/8521785.htmlblog
耻辱墙:http://www.cnblogs.com/wlsandwho/p/4206472.htmlget
=======================================================================it
"C:\Program Files\Python36-32\python.exe" C:/PythonResearch/NaiveBayes/Test_bayes.py
Traceback (most recent call last):
File "C:/PythonResearch/NaiveBayes/Test_bayes.py", line 77, in <module>
emailText=open('email\\ham\\23.txt','r').read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 199: illegal multibyte sequence
Process finished with exit code 1
io
解决问题很简单,把文件用记事本打开,而后另存为,下面编码选ANSI就好。