diff options
| author | 2019-01-29 22:37:44 +0000 | |
|---|---|---|
| committer | 2019-01-29 22:37:44 +0000 | |
| commit | bb047ec1b7f8f3cecccb86f02a6685993b16d32f (patch) | |
| tree | 53d5b47ae5157be5df8710f15dd49a7453583f9f /modules/spotify.py | |
| parent | Forgot to import base64 (spotify.py) (diff) | |
| signature | ||
`base64.b64encode(...)` takes a byte array, not a string (spotify.py)
Diffstat (limited to 'modules/spotify.py')
| -rw-r--r-- | modules/spotify.py | 2 |
1 files changed, 1 insertions, 1 deletions
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}, |
