使用" rb"时出现EOF错误

时间:2017-12-26 07:41:07

标签: python-3.x pickle

这是我的代码:

authors_file_handler = open(authors_file,'r')
authors = pickle.load(authors_file_handler)
authors_file_handler.close()

authors_file是一个.pkl文件,我已经确认它不是空的信息。 关于使用' rb'或者' r + b'代替' r',我收到错误:

文件" ../ tools \ email_preprocess.py",第33行,在预处理中     authors = pickle.load(authors_file_handler) EOFError:退出输入

请告知如何处理此错误。

0 个答案:

没有答案
相关问题