[PR #608] [MERGED] Suppress warnings when cache path does not exist. #959

Closed
opened 2026-02-28 00:02:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/608
Author: @Peter-Schorn
Created: 11/11/2020
Status: Merged
Merged: 11/11/2020
Merged by: @stephanebruckert

Base: masterHead: master


📝 Commits (6)

  • 6faf49c Added an exception clause that catches FileNotFoundError and logs a debug message in SpotifyOAuth.get_cached_token, SpotifyPKCE.get_cached_token and SpotifyImplicitGrant.get_cached_token.
  • 8ae2cdd Changed docs for auth parameter of Spotify.init to access token instead of authorization token. In issue #599, a user confused the access token with the authorization code.
  • 957a26a Updated CHANGELOG.md
  • 04b2b02 Removed FileNotFoundError because it does not exist in python 2.7 (sigh) and replaced it with a call to os.path.exists.
  • 77a16dc Replaced os.path.exists with error.errno == errno.ENOENT to supress errors when the cache file does not exist.
  • caaabd5 Merge branch 'master' into master

📊 Changes

3 files changed (+20 additions, -10 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 spotipy/client.py (+1 -1)
📝 spotipy/oauth2.py (+16 -9)

📄 Description

See issue #605

I also changed the docs for auth parameter of Spotify.init to "access token" instead of "authorization token". In issue #599, a user confused the access token with the authorization code.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/608 **Author:** [@Peter-Schorn](https://github.com/Peter-Schorn) **Created:** 11/11/2020 **Status:** ✅ Merged **Merged:** 11/11/2020 **Merged by:** [@stephanebruckert](https://github.com/stephanebruckert) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (6) - [`6faf49c`](https://github.com/spotipy-dev/spotipy/commit/6faf49cbe3cc417cec6671308c184c0542ecc0c5) Added an exception clause that catches `FileNotFoundError` and logs a debug message in `SpotifyOAuth.get_cached_token`, `SpotifyPKCE.get_cached_token` and `SpotifyImplicitGrant.get_cached_token`. - [`8ae2cdd`](https://github.com/spotipy-dev/spotipy/commit/8ae2cddcff67262b18ff770218f59b3341919dc4) Changed docs for `auth` parameter of `Spotify.init` to `access token` instead of `authorization token`. In issue #599, a user confused the access token with the authorization code. - [`957a26a`](https://github.com/spotipy-dev/spotipy/commit/957a26af2b6fd831db9317768e8d41154d518ccc) Updated CHANGELOG.md - [`04b2b02`](https://github.com/spotipy-dev/spotipy/commit/04b2b02beebdecc8d29b44547cd749d41d8a7789) Removed `FileNotFoundError` because it does not exist in python 2.7 (*sigh*) and replaced it with a call to `os.path.exists`. - [`77a16dc`](https://github.com/spotipy-dev/spotipy/commit/77a16dcd110008a904e78fa326408b86671ddf91) Replaced ` os.path.exists` with `error.errno == errno.ENOENT` to supress errors when the cache file does not exist. - [`caaabd5`](https://github.com/spotipy-dev/spotipy/commit/caaabd5a96c721201307b65b462cba461fe0e434) Merge branch 'master' into master ### 📊 Changes **3 files changed** (+20 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `spotipy/client.py` (+1 -1) 📝 `spotipy/oauth2.py` (+16 -9) </details> ### 📄 Description See issue #605 I also changed the docs for `auth` parameter of `Spotify.init` to "access token" instead of "authorization token". In issue #599, a user confused the access token with the authorization code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:02:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#959
No description provided.