[GH-ISSUE #421] tracks_features breaks on deserialization when a track is requested that doesn't have audio features #141

Closed
opened 2026-02-27 20:23:21 +03:00 by kerem · 1 comment
Owner

Originally created by @caass on GitHub (May 31, 2023).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/421

Describe the bug
Requesting tracks_features for a track that doesn't have features returns null, which serde_json doesn't expect.

To Reproduce
Steps to reproduce the behavior:

  1. Request tracks_features for a track that doesn't have features (e.g. spotify:track:6z99LwRS28wga9xc2u09Po)
  2. Note that serde_json says "unexpected null"

Expected behavior
A track which doesn't have features should be filtered out in the response.

Log/Output data

error=json parse error: invalid type: null, expected struct AudioFeatures at line 1522 column 9
Error:
   0: json parse error: invalid type: null, expected struct AudioFeatures at line 1522 column 9
   1: invalid type: null, expected struct AudioFeatures at line 1522 column 9

Additional context
Add any other context about the problem here.

Originally created by @caass on GitHub (May 31, 2023). Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/421 **Describe the bug** Requesting `tracks_features` for a track that doesn't have features returns `null`, which `serde_json` doesn't expect. **To Reproduce** Steps to reproduce the behavior: 1. Request `tracks_features` for a track that doesn't have features (e.g. `spotify:track:6z99LwRS28wga9xc2u09Po`) 2. Note that serde_json says "unexpected null" **Expected behavior** A track which doesn't have features should be filtered out in the response. **Log/Output data** ``` error=json parse error: invalid type: null, expected struct AudioFeatures at line 1522 column 9 Error: 0: json parse error: invalid type: null, expected struct AudioFeatures at line 1522 column 9 1: invalid type: null, expected struct AudioFeatures at line 1522 column 9 ``` **Additional context** Add any other context about the problem here.
kerem 2026-02-27 20:23:21 +03:00
Author
Owner

@erie-of-the-lake commented on GitHub (Sep 20, 2023):

Given that this issue was resolved by #422 and was acknowledged as such in the changelog under Breaking changes and Bugfixes for version 0.12.0, this issue should be closed.

<!-- gh-comment-id:1728530482 --> @erie-of-the-lake commented on GitHub (Sep 20, 2023): Given that this issue was resolved by #422 and was acknowledged as such in the [changelog](https://github.com/ramsayleung/rspotify/blob/master/CHANGELOG.md) under **Breaking changes** and **Bugfixes** for version 0.12.0, this issue should be closed.
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#141
No description provided.