title: Python Spacy NLP - TypeError: Argument 'string' has incorrect type (expected unicode, got str)
body: <p>I was getting the following error while i was trying to read a txt file in spacy.</p>
  
  <blockquote>
    <p>TypeError: Argument 'string' has incorrect type (expected unicode, got str) </p>
  </blockquote>
  
  <p>Here is the code below</p>
  
  <pre><code>from __future__  import unicode_literals
  import spacy
  nlp= spacy.load('en')
  doc_file = nlp(open("example.txt").read())
  </code></pre>