[GH-ISSUE #477] JSON parsing error when fetching a playlist with user's own local track #156

Closed
opened 2026-02-27 20:23:27 +03:00 by kerem · 3 comments
Owner

Originally created by @matous-volf on GitHub (Apr 19, 2024).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/477

Describe the bug
When a playlist contains a track that has been added from local files and I try to fetch it using rspotify's playlist method, it returns

ParseJson(
    Error("data did not match any variant of untagged enum PlayableItem", line: 1, column: 94835),
)

To Reproduce
Steps to reproduce the behavior:

  1. Add a local file to your Spotify account.
  2. Add the track into a playlist.
  3. Fetch the playlist using the playlist method.
Originally created by @matous-volf on GitHub (Apr 19, 2024). Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/477 **Describe the bug** When a playlist contains a track that has been [added from local files](https://support.spotify.com/us/article/local-files/) and I try to fetch it using `rspotify`'s [`playlist`](https://docs.rs/rspotify/latest/rspotify/clients/trait.BaseClient.html#method.playlist) method, it returns ```rs ParseJson( Error("data did not match any variant of untagged enum PlayableItem", line: 1, column: 94835), ) ``` **To Reproduce** Steps to reproduce the behavior: 1. Add a local file to your Spotify account. 2. Add the track into a playlist. 3. Fetch the playlist using the `playlist` method.
kerem 2026-02-27 20:23:27 +03:00
Author
Owner

@luogni commented on GitHub (Feb 21, 2025):

I get the same (or similar?) error with ncspot while fetching a playlist with a single podcast episode added by spotify web interface:

[2025-02-21][08:36:19] [ureq::unit] [DEBUG] response 200 to GET https://api.spotify.com/v1/playlists/5rWYdrwZNbrUz2NjmoFlJx/tracks?offset=0&market=from_token&limit=100
[2025-02-21][08:36:19] [ncspot::spotify_api] [ERROR] unhandled api error: json parse error: data did not match any variant of untagged enum PlayableItem at line 1 column 2378
<!-- gh-comment-id:2673809612 --> @luogni commented on GitHub (Feb 21, 2025): I get the same (or similar?) error with ncspot while fetching a playlist with a single podcast episode added by spotify web interface: ``` [2025-02-21][08:36:19] [ureq::unit] [DEBUG] response 200 to GET https://api.spotify.com/v1/playlists/5rWYdrwZNbrUz2NjmoFlJx/tracks?offset=0&market=from_token&limit=100 [2025-02-21][08:36:19] [ncspot::spotify_api] [ERROR] unhandled api error: json parse error: data did not match any variant of untagged enum PlayableItem at line 1 column 2378 ```
Author
Owner

@ramsayleung commented on GitHub (Feb 23, 2025):

Unfortunately, I couldn't reproduced this issue, as I was unable to add local file to Spotify by following this guide: https://support.spotify.com/us/article/local-files/, neither mp3 or wov file works.

Would you able to provide the JSON return from the Spotify Server which caused the above error, so I could debug without manully adding the file.

<!-- gh-comment-id:2676482773 --> @ramsayleung commented on GitHub (Feb 23, 2025): Unfortunately, I couldn't reproduced this issue, as I was unable to add local file to Spotify by following this guide: https://support.spotify.com/us/article/local-files/, neither mp3 or wov file works. Would you able to provide the JSON return from the Spotify Server which caused the above error, so I could debug without manully adding the file.
Author
Owner

@matous-volf commented on GitHub (May 10, 2025):

I've just tried it again with the same playlist containing the local track and it's working now. Thanks!

<!-- gh-comment-id:2868835803 --> @matous-volf commented on GitHub (May 10, 2025): I've just tried it again with the same playlist containing the local track and it's working now. Thanks!
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/rspotify#156
No description provided.