You should encode str into bytes.
str
bytes
data_string = os.environ['INTRINIO_USER'] + ":" + os.environ['INTRINIO_PASSWORD'] data_bytes = data_string.encode("utf-8") base64.b64encode(data_bytes)
1.4m articles
1.4m replys
5 comments
57.0k users