UnicodeDecodeError: 'gbk' codec can't decode

书中的程序 wordlist = textpare(open('email/spam/%d.txt'%i).read())
调试后
wordList = textParse(open('email/ham/%d.txt'% i,'r',encoding='UTF-8',errors='ignore').read())

猜你喜欢

转载自blog.csdn.net/weixin_37260876/article/details/81627026