title: Python: UnicodeDecodeError: 'utf-8' codec can't decode byte...invalid continuation byte
body: <p>I'm building a web scraper using BeautifulSoup on Python 3.3</p>
  
  <p>However I get a problem which prevents me from getting a valid strin* that I can use with BeautifulSoup. That is:</p>
  
  <pre><code>UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 7047: invalid continuation byte
  </code></pre>
  
  <p>I know there are dozens of similar questions but I haven't so far found a method that can help me to diagnose what's wrong with the following code:</p>
  
  <pre><code>import urllib.request
  URL = "&lt;url&gt;" # sorry, I cannot show the url for privacy reasons, but it's a normal html document
  page = urllib.request.urlopen(URL)
  page = page.read().decode("utf-8") # from bytes to &lt;source encodings&gt;
  </code></pre>
  
  <p>As I guessed I notice <em>this error occurs only with some URLS and not with others</em>. Even with this same error I wasn't having this error until yesterday. Then today I run the program again and the error popped up..</p>
  
  <p>Any clue on how to diagnose the error?</p>