title: Python - ValueError: Expecting value: line 1 column 1 (char 0)
body: <p>This produces and error:</p>
  
  <pre><code>ValueError: Expecting value: line 1 column 1 (char 0)
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>...
  
  print("Your phonebook contains the following entries:")
  for name, number in phoneBook.items():
      print("%s - %s" % (name, number))
  
  while not created:
      if not os.path.isfile('phonebook.json'):
          with open('phonebook.json', 'wb') as f:
              try:
                  f.write('{}')
              except TypeError:
                  {}
          created = True
          print('New phonebook created!')
      else:
          print('Phonebook found!')
          created = True
  
  with open('phonebook.json', 'r') as f:
      try:
          phoneBook_Ori = json.load(f)
          phoneBook_Upd = dict(phoneBook_Ori.items() + phoneBook.items())
          phoneBook_Ori.write(phoneBook_Upd)
      except EOFError:
          {}
  if EOFError:
      with open('phonebook.json', 'w') as f:
          json.dump(phoneBook, f)
  else:
      with open('phonebook.json', 'w') as f:
          json.dump(phoneBook_Ori, f)
  </code></pre>
  
  <p>Has anyone got an idea of how to fix this?</p>
  
  <p>I have also previously asked a question on this code <a href="https://stackoverflow.com/questions/28812686/python-pickle-load-takes-one-positional-argument-2-given">here</a></p>