title: Base64 encoding in python3
body: <p>my script includes this line:</p>
  
  <pre><code>encoded = "Basic " + s.encode("base64").rstrip()
  </code></pre>
  
  <p>But gives me back the error:</p>
  
  <pre><code>LookupError: 'base64' is not a text encoding; use codecs.encode() to handle arbitrary codecs
  </code></pre>
  
  <p>This line seemed to work fine in python 2 but since switching to 3 I get the error</p>