0
filename = "/content/classifier_10class.pkl"
infile = open(filename,'rb')
new_dict = pickle.load(infile)
infile.close()

EOFError                                  Traceback (most recent call last)

<ipython-input-57-36f3a6bd7cfb> in <module>()

      1 filename = "/content/classifier_10class.pkl"
      2 infile = open(filename,'rb')
 ---> 3 new_dict = pickle.load(infile)
      4 infile.close()

EOFError: Ran out of input
David Buck
  • 3,752
  • 35
  • 31
  • 35
  • see https://stackoverflow.com/questions/24791987/why-do-i-get-pickle-eoferror-ran-out-of-input-reading-an-empty-file – balderman Oct 11 '21 at 18:47
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 11 '21 at 20:10

1 Answers1

1

Can you try following code ?

>>> import pickle
>>> with open('file.pkl', 'rb') as fp:
>>>     data = pickle.load(fp)
Vinay Chaudhari
  • 128
  • 2
  • 9