TypeError: a bytes-like object is required, not 'str' - python 2 to 3 [duplicate]
You should encode str
into bytes
.
data_string = os.environ['INTRINIO_USER'] + ":" + os.environ['INTRINIO_PASSWORD']data_bytes = data_string.encode("utf-8")base64.b64encode(data_bytes)