title: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 81201: ordinal not in range(128)
body: <p>I am trying to read a dictionary_format_file.txt but I keep getting the error at line.</p>
  
  <p>I read other posts and they made complete sense, however I could not fix my problem still.</p>
  
  <p>Any help is appreciated.</p>
  
  <pre><code>import ast
  
  path = '/Users/xyz/Desktop/final/'
  filename = 'dictionary_format_text_file.txt'
  
  with open((path+filename), 'r') as f:
      s=f.read()
      s=s.encode('ascii', 'ignore').decode('ascii')
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>  Traceback (most recent call last):
    File "/Users/xyz/Desktop/final/boolean_query.py", line 347, in &lt;module&gt;
      s=s.encode('ascii', 'ignore').decode('ascii')
  
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]
  builtins.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 81201: ordinal not in range(128)
  </code></pre>