title: Python - JSON Load from file not working
body: <p>So I am writing a basic multipurpose script which uses json to import a dictionary from a file but for some reason it doesn't save properly. I've looked all over and can't find anything relating to my exact problem.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import json
  dicti = json.loads(open('database.db'))
  print(str(dicti))
  </code></pre>
  
  <p>But then I get this error:</p>
  
  <pre><code>TypeError: JSON object must be str, not TextIOWrapper.
  </code></pre>
  
  <p>So does anyone have any ideas on what the problem is? Thanks in Advance.</p>
  
  <p>Note: Currently the file only has inside it:</p>
  
  <pre><code>{}
  </code></pre>