From bb047ec1b7f8f3cecccb86f02a6685993b16d32f Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 29 Jan 2019 22:37:44 +0000 Subject: `base64.b64encode(...)` takes a byte array, not a string (spotify.py) --- modules/spotify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/spotify.py') diff --git a/modules/spotify.py b/modules/spotify.py index 14c0482c..125c4c76 100644 --- a/modules/spotify.py +++ b/modules/spotify.py @@ -19,7 +19,7 @@ class Module(ModuleManager.BaseModule): client_id = self.bot.config["spotify-client-id"] client_secret = self.bot.config["spotify-client-secret"] bearer = "%s:%s" % (client_id, client_secret) - bearer = base64.b64encode(bearer).decode("utf8") + bearer = base64.b64encode(bearer.encode("utf8")).decode("utf8") page = utils.http.request(URL_TOKEN, method="POST", headers={"Authorization": "Basic %s" % bearer}, -- cgit v1.3.1-10-gc9f91