title: Python Fernet TypeError: token must be bytes although the input are bytes
body: <p>I have encrypted values in a mongo database and want to decrypt them. So i find the data in the database and access it like this:</p>
  <pre><code>for c in conversation_list:
      for m in c['messages']:
          print(m['content']) 
  </code></pre>
  <p>this prints b'gAAAAABiCMy6enO6UtropwNB6swjB2WqNthx-abULtxsQMqUKw9R0a7HXZLFEklTTZqc04NIxExTPDQk6xkrvnBKXyj8K5CtHFzg_b8w7RcX0ma36TnXM8g='</p>
  <pre><code>print(fernet.decrypt(m['content']))
  </code></pre>
  <p>And this raises the typeerror.</p>
  <p>I don't understand what I'm doing wrong. I have encrypted a test string exactly the same way in a test file and can decrypt it without a problem, but as soon as I load the data from the database, I get this error.</p>
  <p>Edit: Some further testing revealed, that python does not interpret the byte string as bytes, but as a normal string. How do I get python to understand that this is in fact a byte string?</p>