=================================版權聲明=================================
版權聲明:原創文章 謝絕轉載
請通過右側公告中的“聯系郵箱(wlsandwho@foxmail.com)”聯系我
勿用於學術性引用。
勿用於商業出版、商業印刷、商業引用以及其他商業用途。
本文不定期修正完善。
本文鏈接:http://www.cnblogs.com/wlsandwho/p/8521785.html
恥辱牆:http://www.cnblogs.com/wlsandwho/p/4206472.html
=======================================================================
"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
解決問題很簡單,把文件用記事本打開,然后另存為,下面編碼選ANSI就好。