You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get_playlist fails on the new "item" wrapper (Feb 2026 API change) #774
Since Spotify's Feb 2026 Web API migration, playlist responses wrap each entry in item instead of track (tracks.track → items.item), and track is now marked deprecated.
PlaylistTrack still requires track, so get_playlist and get_playlist_items fail on the new payload:
MissingField: Field "track" of type Item is missing in PlaylistTrack instance
→ InvalidFieldValue: Field "items" of type list[PlaylistTrack] in PlaylistTracks ...
→ InvalidFieldValue: Field "items" of type PlaylistTracks in Playlist ...
Reproduced on spotifyaio==2.0.2: feeding a real playlist-items response (entries with item and no track) to Playlist.from_json / PlaylistTracks raises the above; adding track = item makes it parse.
track is still sent during the deprecation window, so both shapes need to work. I think the cleanest fix is normalizing item → track in PlaylistTrack.__pre_deserialize__, mirroring what Playlist.__pre_deserialize__ already does for tracks → items. Happy to open a PR.
Related: #767 handles a missing items list (metadata-only playlists) but not the track/item rename.
Reacted by Rajat Banerjee, uglyburger0 and rossfoss
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Still an issue in Home assistant, which is pinned to version 2.0.2 of this library. Hoass will need to update their manifest once this pr is merged and released..
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
I can confirm this also breaks Home Assistant Spotify browsing on my HA instance.
Home Assistant Core: 2026.x
spotifyaio: 2.0.2
The failing payload contains playlist entries with item and no track, and HA shows:
Field "items" of type PlaylistTracks in Playlist has invalid value ...
A local patch that normalizes item -> track in PlaylistTrack.__pre_deserialize__ fixes browsing the affected Spotify Liked Songs / playlist-like collection for me.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Retested with Home Assistant Core 2026.10.2 and spotifyaio 2.0.2, without the previous local patch.
While playing the affected Liked Songs collection, I fetched the current playlist response directly from Spotify and passed it to spotifyaio.models.Playlist.from_json():
Playback context type: playlist
Entries returned: 100
Entries containing item: 100
Entries containing track: 0
Deserialization: failed with InvalidFieldValue, with another InvalidFieldValue as the nested exception.
The library issue therefore still reproduces with the current Spotify response.
However, the HA integration now continues working during playback because Core catches InvalidFieldValue and MissingField when fetching optional playlist metadata and continues without that metadata. This handling was added in home-assistant/core#183143 and is present in Core 2026.10.2.
So the playback improvement in HA does not mean the underlying parsing issue is resolved; it prevents the playlist deserialization failure from breaking playback state updates.
Activity
github-actions commentedon Jun 30, 2026
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
rqbanerjee commentedon Jul 2, 2026
Still an issue in Home assistant, which is pinned to version 2.0.2 of this library. Hoass will need to update their manifest once this pr is merged and released..
github-actions commentedon Aug 3, 2026
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
maxmaxme commentedon Aug 3, 2026
The issue is still relevant
epixcz commentedon Aug 5, 2026
I can confirm this also breaks Home Assistant Spotify browsing on my HA instance.
Home Assistant Core: 2026.x
spotifyaio: 2.0.2
The failing payload contains playlist entries with
itemand notrack, and HA shows:Field "items" of type PlaylistTracks in Playlist has invalid value ...A local patch that normalizes
item->trackinPlaylistTrack.__pre_deserialize__fixes browsing the affected Spotify Liked Songs / playlist-like collection for me.github-actions commentedon Sep 4, 2026
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
maxmaxme commentedon Sep 4, 2026
The issue is still relevant
github-actions commentedon Oct 5, 2026
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
maxmaxme commentedon Oct 5, 2026
The issue is still relevant
epixcz commentedon Oct 19, 2026
Retested with Home Assistant Core 2026.10.2 and spotifyaio 2.0.2, without the previous local patch.
While playing the affected Liked Songs collection, I fetched the current playlist response directly from Spotify and passed it to spotifyaio.models.Playlist.from_json():
The library issue therefore still reproduces with the current Spotify response.
However, the HA integration now continues working during playback because Core catches InvalidFieldValue and MissingField when fetching optional playlist metadata and continues without that metadata. This handling was added in home-assistant/core#183143 and is present in Core 2026.10.2.
So the playback improvement in HA does not mean the underlying parsing issue is resolved; it prevents the playlist deserialization failure from breaking playback state updates.