Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlaylistTrackObject.track can be null #45

Closed
ghost opened this issue Oct 14, 2019 · 2 comments · Fixed by #51 or #76
Closed

PlaylistTrackObject.track can be null #45

ghost opened this issue Oct 14, 2019 · 2 comments · Fixed by #51 or #76
Assignees
Labels
bug Something isn't working track Track something even after closing

Comments

@ghost
Copy link

ghost commented Oct 14, 2019

example playlist: spotify:playlist:6fzw3GiLktfRKczD6sl6mT
bug: spotify/web-api#958

Traceback:
File "spotipy/model/playlist.py", line 33, in post_init
self.items = [PlaylistTrack(**t) for t in self.items]
File "spotipy/model/playlist.py", line 33, in
self.items = [PlaylistTrack(**t) for t in self.items]
File "", line 8, in init
File "spotipy/model/playlist.py", line 24, in post_init
self.track = FullTrack(**self.track)
TypeError: type object argument after ** must be a mapping, not NoneType

@felix-hilden felix-hilden added bug Something isn't working track Track something even after closing labels Oct 17, 2019
@felix-hilden felix-hilden self-assigned this Oct 17, 2019
@felix-hilden felix-hilden mentioned this issue Oct 17, 2019
Merged
@ghost
Copy link
Author

ghost commented Nov 11, 2019

This is actually documented feature:
"Information about the tracks of the playlist. Note, a track object may be null. This can happen if a track is no longer available."
https://developer.spotify.com/documentation/web-api/reference/playlists/get-playlist/

@felix-hilden felix-hilden reopened this Nov 15, 2019
@felix-hilden
Copy link
Owner

Reimplement this as a check on the track level as discussed in the PR review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working track Track something even after closing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant