title: WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER. With Requests and Beastuifulsoup
body: <p>I had this web scraping code working a few minutes ago, but now I get this warning and encoding. Since this request doesn't return html, Beautifulsoup is returning a None type when I search for the contents of a  tag. What is going wrong here? I tried to google a bit for this encoding problem, but couldn't find a clear answer.</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  
  url = 'http://finance.yahoo.com/q?s=aapl&amp;fr=uh3_finance_web&amp;uhb=uhb2'
  
  data = requests.get(url)
  soup = BeautifulSoup(data.content).text
  print(data)
  </code></pre>
  
  <p>Here are the results:</p>
  
  <pre><code>0.0 seconds
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt;
  WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
  &lt;Response [200]&gt; 
  {}
  
  Process finished with exit code 0
  </code></pre>