title: I have a problem understanding an error in Python
body: <p><a href="https://i.stack.imgur.com/MAhSf.png" rel="nofollow noreferrer">enter image description here</a>I am trying to open a basic <code>file.txt</code> file which is located in the same <code>CWD</code> as my python interpreter.</p>
  
  <p>So I do <code>a=open("file.txt","r")</code></p>
  
  <p>Then I want to display its content (there's only one test line like <code>hello world</code> in it)</p>
  
  <p>So I do <code>content=a.read()</code></p>
  
  <p>So you know, when I put <code>a</code> enter, I have this:</p>
  
  <pre class="lang-py prettyprint-override"><code>a
  &lt;_io.TextIOWrapper name='fichier.txt' mode='r' encoding='UTF-8'&gt;
  </code></pre>
  
  <p>Then I have an error I don't understand. Does someone have an idea on how to fix this ?</p>
  
  <pre class="lang-py prettyprint-override"><code>Traceback (most recent call last):
    File "&lt;pyshell#6&gt;", line 1, in &lt;module&gt;
      contenu=a.read()
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/codecs.py", line 322, in decode
      (result, consumed) = self._buffer_decode(data, self.errors, final)
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 15: invalid continuation byte
  </code></pre>