From 18d848a59105057b76c4022089cfebbefca09d7e Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 20 Mar 2019 08:42:29 +0100 Subject: [PATCH] one forgotten decode on base64 encoded string --- rowers/polarstuff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rowers/polarstuff.py b/rowers/polarstuff.py index c4cc0ced..dc4f397a 100644 --- a/rowers/polarstuff.py +++ b/rowers/polarstuff.py @@ -124,7 +124,8 @@ def get_polar_notifications(): try: headers = { 'Authorization': 'Basic %s' % base64.b64encode(auth_string) } except TypeError: - headers = { 'Authorization': 'Basic %s' % base64.b64encode(bytes(auth_string,'utf-8')) } + headers = { 'Authorization': 'Basic %s' % base64.b64encode( + bytes(auth_string,'utf-8')).decode('utf-8') } response = requests.get(url, headers=headers)