mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #785] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) when using playlist_items() #486
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#486
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IchbinLuka on GitHub (Feb 23, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/785
Bug
When calling playlist_items() I get a JSONDecodeError. Below is one the examples which raises this error. I've checked multiple times that both the client-secret and client-id are correct. The weird thing is that this worked perfectly until a few weeks ago.
Code
Output
Environment:
@Peter-Schorn commented on GitHub (Feb 24, 2022):
This indicates that the data was completely empty, which is not valid JSON.
I tested your code and could not reproduce this error. I received all pages of the playlist. Do you experience this error consistently?
@IchbinLuka commented on GitHub (Feb 25, 2022):
Deleting the .cache file solved the problem. The access token saved there probably expired and spotipy didn't generate a new one
@Peter-Schorn commented on GitHub (Feb 25, 2022):
No that can't be the cause of this error. If you make a request with an expired/invalid access token, you get a very specific type of error.