Without encodeing the string, I get the following error:
File "/usr/lib/python3.8/site-packages/oauth2/clients/smtp.py", line 41, in authenticate
base64.b64encode(oauth2.build_xoauth_string(url, consumer, token)))
File "/usr/lib/python3.8/base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'
Without
encode
ing the string, I get the following error:File "/usr/lib/python3.8/site-packages/oauth2/clients/smtp.py", line 41, in authenticate base64.b64encode(oauth2.build_xoauth_string(url, consumer, token))) File "/usr/lib/python3.8/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str'