[GH-ISSUE #401] error loading playlists without images #1151

Closed
opened 2026-03-14 13:41:46 +03:00 by kerem · 3 comments
Owner

Originally created by @mochimisu on GitHub (Mar 25, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/401

Describe the bug
images can be null in some playlists. seems to be true for some old playlists, but also empty playlists

To Reproduce

  1. Create an empty playlist.
  2. Remove Playlist_cache.json
  3. Start spotify_player
  4. Note empty playlists window

Expected behaviour
Playlists should load

Log and backtrace
Relevant log line

2024-03-25T01:17:07.902710Z ERROR client_request{request=GetUserPlaylists}: spotify_player::client::handlers: Failed to handle client request: json parse error: invalid type: null, expected a sequence at line 1 column 392: invalid type: null, expected a sequence at line 1 column 392

Screenshots
If applicable, add screenshots to help explain your problem.
20240324_18h21m59s_grim

Environment

  • OS: Arch
  • Application version: 0.17.1

Additional context
example problematic json
{"href":"https://api.spotify.com/v1/users/.../playlists?offset=0&limit=1","limit":1,"next":"https://api.spotify.com/v1/users/.../playlists?offset=1&limit=1","offset":0,"previous":null,"total":43,"items":[{"collaborative":false,"description":"","external_urls":{"spotify":"https://open.spotify.com/playlist/..."},"href":"https://api.spotify.com/v1/playlists/...","id":"...","images":null,"name":"My Playlist #26","owner":{"display_name":"...","external_urls":{"spotify":"https://open.spotify.com/user/..."},"href":"https://api.spotify.com/v1/users/...","id":"...","type":"user","uri":"spotify:user:..."},"primary_color":null,"public":true,"snapshot_id":"...","tracks":{"href":"https://api.spotify.com/v1/playlists/.../tracks","total":0},"type":"playlist","uri":"spotify:playlist:..."}]}

Originally created by @mochimisu on GitHub (Mar 25, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/401 **Describe the bug** `images` can be `null` in some playlists. seems to be true for some old playlists, but also empty playlists **To Reproduce** 1. Create an empty playlist. 2. Remove `Playlist_cache.json` 3. Start `spotify_player` 4. Note empty playlists window **Expected behaviour** Playlists should load **Log and backtrace** Relevant log line ```2024-03-25T01:17:07.902710Z ERROR client_request{request=GetUserPlaylists}: spotify_player::client::handlers: Failed to handle client request: json parse error: invalid type: null, expected a sequence at line 1 column 392: invalid type: null, expected a sequence at line 1 column 392``` **Screenshots** If applicable, add screenshots to help explain your problem. ![20240324_18h21m59s_grim](https://github.com/aome510/spotify-player/assets/868700/bc1a10b2-c662-41cc-a232-b66001a81e0d) **Environment** - OS: Arch - Application version: 0.17.1 **Additional context** example problematic json ```{"href":"https://api.spotify.com/v1/users/.../playlists?offset=0&limit=1","limit":1,"next":"https://api.spotify.com/v1/users/.../playlists?offset=1&limit=1","offset":0,"previous":null,"total":43,"items":[{"collaborative":false,"description":"","external_urls":{"spotify":"https://open.spotify.com/playlist/..."},"href":"https://api.spotify.com/v1/playlists/...","id":"...","images":null,"name":"My Playlist #26","owner":{"display_name":"...","external_urls":{"spotify":"https://open.spotify.com/user/..."},"href":"https://api.spotify.com/v1/users/...","id":"...","type":"user","uri":"spotify:user:..."},"primary_color":null,"public":true,"snapshot_id":"...","tracks":{"href":"https://api.spotify.com/v1/playlists/.../tracks","total":0},"type":"playlist","uri":"spotify:playlist:..."}]}```
kerem 2026-03-14 13:41:46 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Mar 25, 2024):

I'm well aware of this issue: https://github.com/ramsayleung/rspotify/issues/459, it seems rspotify doesn't want to fix it. I implemented a patch but only for get-playlist API. Will create another patch for get-playlists.

<!-- gh-comment-id:2017109005 --> @aome510 commented on GitHub (Mar 25, 2024): I'm well aware of this issue: https://github.com/ramsayleung/rspotify/issues/459, it seems `rspotify` doesn't want to fix it. I implemented a patch but only for `get-playlist` API. Will create another patch for `get-playlists`.
Author
Owner

@aome510 commented on GitHub (Mar 25, 2024):

@mochimisu can you try running in https://github.com/aome510/spotify-player/pull/402 to see if it fixes the issue?

<!-- gh-comment-id:2017116733 --> @aome510 commented on GitHub (Mar 25, 2024): @mochimisu can you try running in https://github.com/aome510/spotify-player/pull/402 to see if it fixes the issue?
Author
Owner

@Icelk commented on GitHub (Apr 1, 2024):

Before the next release, one may use the API to check which playlist is the culprit. Go the the spotify API documentation link below and test the query with limit = 50 offset = 0 on your own account (you need to be logged in):
https://developer.spotify.com/documentation/web-api/reference/get-a-list-of-current-users-playlists
Then Ctrl+F for "images": null

<!-- gh-comment-id:2029553841 --> @Icelk commented on GitHub (Apr 1, 2024): Before the next release, one may use the API to check which playlist is the culprit. Go the the spotify API documentation link below and test the query with limit = 50 offset = 0 on your own account (you need to be logged in): <https://developer.spotify.com/documentation/web-api/reference/get-a-list-of-current-users-playlists> Then Ctrl+F for `"images": null`
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/spotify-player#1151
No description provided.