title: EOFError whilst pickling in Python
body: <p>Here's the problem - I'm trying to pickle, and then unpickle hiscores. When I use pickle.load, Python seems to think that I'm trying to load a file called 'Pickle' that I have. Here's the code:</p>
  
  <pre><code>def recieve_hiscores():
      hiscores_file = open("hiscores_file.dat", "rb")
      for i in hiscores_file:
          hiscores = pickle.load(hiscores_file)
          hiscores = str(hiscores)
          print(hiscores)
  </code></pre>
  
  <p>Here's the pickling code:</p>
  
  <pre><code>def send_hiscores(score):
      hiscores_file = open("hiscores_file.dat", "ab")
      pickle.dump(score, hiscores_file)
      hiscores_file.close()
  </code></pre>
  
  <p>And here's the error message:</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Python31\My Updated Trivia Challenge.py", line 106, in &lt;module&gt;
  main()
  File "C:\Python31\My Updated Trivia Challenge.py", line 104, in main
  recieve_hiscores()
  File "C:\Python31\My Updated Trivia Challenge.py", line 56, in recieve_hiscores
  hiscores = pickle.load(hiscores_file)
  File "C:\Python31\lib\pickle.py", line 1365, in load
  encoding=encoding, errors=errors).load()
  EOFError
  </code></pre>
  
  <p>Don't worry if there's any other mistakes, I'm still learning, but I can't work this out.</p>