Skip to content

Commit

Permalink
Fix text attribute for Response object (#811)
Browse files Browse the repository at this point in the history
* Fix text attribute for Response object

* Add a changelog for the AttributeError PR
  • Loading branch information
moehmeni authored Jun 18, 2022
1 parent c1a85f1 commit 72a6cd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Changed URI handling in `client.Spotify._get_id()` to remove qureies if provided by error.
* Added a new parameter to `RedisCacheHandler` to allow custom keys (instead of the default `token_info` key)
* Simplify check for existing token in `RedisCacheHandler`
* Fix `AttributeError` for `text` attribute of the `Response` object

### Changed
* Removed Python 3.5 and added Python 3.9 in Github Action
Expand Down
2 changes: 1 addition & 1 deletion spotipy/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _handle_oauth_error(self, http_error):
# then try do decode it into text

# if we receive an empty string (which is falsy), then replace it with `None`
error = response.txt or None
error = response.text or None
error_description = None

raise SpotifyOauthError(
Expand Down

0 comments on commit 72a6cd9

Please sign in to comment.