title: Depickling from a (possibly empty) file
body: <p>So I'm trying to create a file and read from it even though its empty.  So the next time I run the program the file will already exist and there will be data in it.</p>
  
  <pre><code>#this should create the file
  filename = open("roombooking.bin","wb")
  #this should load the data into a list but since its first created it should be an empty list
  monday=pickle.load(open("roombooking.bin","rb"))
  </code></pre>
  
  <p>this is the error i get</p>
  
  <pre><code>Traceback (most recent call last):
      monday=pickle.load(open("roombooking.bin","rb"))
    File "C:\Python27\lib\pickle.py", line 1378, in load
      return Unpickler(file).load()
    File "C:\Python27\lib\pickle.py", line 858, in load
      dispatch[key](self)
    File "C:\Python27\lib\pickle.py", line 880, in load_eof
      raise EOFError
  EOFError
  </code></pre>