title: How to get rid off the "WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER." in beautifulSoup python3
body: <p>Using pydev, while compiling this code:</p>
  
  <pre><code>import re
  import urllib.request 
  from bs4 import BeautifulSoup
  
  url = "http://talkingpointsmemo.com/news/trump-response-melania-speech-plagiarism"
  req = urllib.request.Request(url, headers={'User-Agent': 'Chrome/51.0.2704.103'})
  html = urllib.request.urlopen(req).read()
  </code></pre>
  
  <p>giving the error <code>WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.</code></p>
  
  <p>This is not working. </p>
  
  <pre><code>reqSoup = BeautifulSoup('http://acl.ldc.upenn.edu/P/P96/P96-1004.pdf')
  </code></pre>
  
  <p>Source:  <a href="https://stackoverflow.com/questions/15038402/warning-some-characters-could-not-be-decoded-and-were-replaced-by-replacement">Warning: Some characters could not be decoded, and were replaced by REPLACEMENT CHARACTER</a>
  and what is <code>html_path</code> in this line </p>
  
  <pre><code>soup = BeautifulSoup(open(html_path, 'r'),"html.parser",from_encoding="iso-8859-1")
  </code></pre>
  
  <p>Source : <a href="https://stackoverflow.com/questions/30110289/warningrootsome-characters-could-not-be-decoded-and-were-replaced-with-replac">WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER. With Requests and Beastuifulsoup</a></p>