[PR #557] [CLOSED] Fix JSONDecodeError on reading cache if you somehow have empty cache #937

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

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/557
Author: @Callahan633
Created: 8/17/2020
Status: Closed

Base: masterHead: oauth_json_decode_bug


📝 Commits (2)

  • 1de2786 Fix JSONDecodeError on reading cache if you somehow have empty cache file
  • a9dbdc2 Removed unnecessary assignment to make tests pass successfully

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 spotipy/oauth2.py (+2 -1)

📄 Description

I added a check to see if the cache file is an empty string, as this could result in an error in json.loads(token_info_string) on line 287
Related open issue is #493


🔄 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/557 **Author:** [@Callahan633](https://github.com/Callahan633) **Created:** 8/17/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `oauth_json_decode_bug` --- ### 📝 Commits (2) - [`1de2786`](https://github.com/spotipy-dev/spotipy/commit/1de278621be70ee6e3d3e64f5be4f37719d6190b) Fix JSONDecodeError on reading cache if you somehow have empty cache file - [`a9dbdc2`](https://github.com/spotipy-dev/spotipy/commit/a9dbdc2b37827e6b535a34d1f3662f071ecdb382) Removed unnecessary assignment to make tests pass successfully ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `spotipy/oauth2.py` (+2 -1) </details> ### 📄 Description I added a check to see if the cache file is an empty string, as this could result in an error in `json.loads(token_info_string)` on line 287 Related open issue is #493 --- <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:45 +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#937
No description provided.