Skip to content

Commit

Permalink
Fix Spotify image failing in Python 3.5
Browse files Browse the repository at this point in the history
In Python 3.5, `json.loads` accepts only `str`, not `bytes`.

Fixes DocMarty84/koozic#31
  • Loading branch information
DocMarty84 committed Aug 19, 2019
1 parent 6bf8f37 commit f796182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/oomusic_spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _get_token(self):
if res.status_code != 200:
_logger.info("Could not get Spotify token. Error code: %s", res.status_code)
return ""
content = json.loads(res.content)
content = json.loads(res.content.decode("utf-8"))
self.create(
{
"name": content["access_token"],
Expand Down

0 comments on commit f796182

Please sign in to comment.