title: TypeError: must be str, not bytes Error
body: <p>In a python code of mine, I am getting this error while execution of this line.</p>
  
  <pre><code>fo.write(text.replace("'","").encode("utf8"));
  </code></pre>
  
  <p>Error :</p>
  
  <pre><code>TypeError: must be str, not bytes
  </code></pre>
  
  <p>It was working fine with python 2.7 but with 3, it is giving error.</p>