TypeError: cannot use a string p

2018-06-19  本文已影响0人  HELLOTREE1

emailText = open('email/ham/6.txt','rb').read() 

TypeError: cannot use a string pattern on a bytes-like object  

解决方法:

emailText = open('email/ham/6.txt','rb').read().decode('GBK')  

上一篇 下一篇

猜你喜欢

热点阅读