-1

this is the code that gets the error:

month_date = pickle.load(open("month.dat", "rb"))

this is the error I get:

File "/Users/lvanrem/PythonTest/weatherAI_V2.py", line 25, in <module>
month_date = pickle.load(open("month.dat", "rb"))
EOFError: Ran out of input

let me know if you can help me...

  • The file is empty – andreis11 Apr 20 '20 at 14:01
  • 2
    Or at least not complete. The `EOFError` is telling you that `pickle.load` needed to read more data to completely decode what it had already read, but there was no more data to read from the file. So the question is, what *is* in `month.dat`? – chepner Apr 20 '20 at 14:12

1 Answers1

0

the awnser was indeed that the file was empty. my solution was that i added an except statement that would fill the file with a backupfile. this happened when i interupted my python script.

thx for the awnser (=