title: UnicodeDecodeError 'utf-8' codec can't decode byte 0x92 in position 2893: invalid start byte
body: <p>I'm trying to open a series of HTML files in order to get the text from the body of those files using BeautifulSoup. I have about 435 files that I wanted to run through but I keep getting this error. </p>
  
  <p>I've tried converting the HTML files to text and opening the text files but I get the same error... </p>
  
  <pre><code>path = "./Bitcoin"
  for file in os.listdir(path):
      with open(os.path.join(path, file), "r") as fname:
          txt = fname.read()
  </code></pre>
  
  <p>I want to get the source code of the HTML file so I can parse it using beautifulsoup but I get this error</p>
  
  <pre><code>---------------------------------------------------------------------------
  UnicodeDecodeError                        Traceback (most recent call last)
  &lt;ipython-input-133-f32d00599677&gt; in &lt;module&gt;
        3 for file in os.listdir(path):
        4     with open(os.path.join(path, file), "r") as fname:
  ----&gt; 5         txt = fname.read()
  
  ~/anaconda3/lib/python3.7/codecs.py in decode(self, input, final)
      320         # decode input (taking the buffer into account)
      321         data = self.buffer + input
  --&gt; 322         (result, consumed) = self._buffer_decode(data, self.errors, final)
      323         # keep undecoded input until the next call
      324         self.buffer = data[consumed:]
  
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 2893: invalid start byte
  </code></pre>