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

Playlist with missing video_thumbnail #132

Closed
jingw222 opened this issue Jan 16, 2020 · 3 comments
Closed

Playlist with missing video_thumbnail #132

jingw222 opened this issue Jan 16, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@jingw222
Copy link
Contributor

  File "/Users/jameswong/.pyenv/versions/3.7.5/envs/dash_plotly/lib/python3.7/site-packages/tekore/client/api/playlist/view.py", line 158, in playlist_tracks
    return PlaylistTrackPaging(**json)
  File "<string>", line 9, in __init__
    
  File "/Users/jameswong/.pyenv/versions/3.7.5/envs/dash_plotly/lib/python3.7/site-packages/tekore/model/playlist.py", line 39, in __post_init__
    self.items = [PlaylistTrack(**t) for t in self.items]
  File "/Users/jameswong/.pyenv/versions/3.7.5/envs/dash_plotly/lib/python3.7/site-packages/tekore/model/playlist.py", line 39, in <listcomp>
    self.items = [PlaylistTrack(**t) for t in self.items]
  File "<string>", line 8, in __init__
    
  File "/Users/jameswong/.pyenv/versions/3.7.5/envs/dash_plotly/lib/python3.7/site-packages/tekore/model/playlist.py", line 25, in __post_init__
    self.video_thumbnail = Image(**self.video_thumbnail)
TypeError: type object argument after ** must be a mapping, not NoneType

It seems that tekore does not like to request a playlist without an image thumbnail? Just got this error unexpectedly. Or am I missing something?

@felix-hilden felix-hilden added the bug Something isn't working label Jan 16, 2020
@felix-hilden
Copy link
Owner

felix-hilden commented Jan 16, 2020

It seems like it! Or rather playlist tracks without a video thumbnail. Could you also attach the playlist in question so I can test it?

Sadly the attribute is undocumented, along with a few others in the playlist_tracks, so we'll have to rely on our tests for it.

@jingw222
Copy link
Contributor Author

jingw222 commented Jan 16, 2020

Here is one I just ran into

playlist_id = '37i9dQZF1DX2RxBh64BHjQ'
playlist_tracks = spotify.playlist_tracks(playlist_id)

And yes you're right. It's PlaylistTrack that makes the complaint. The official doc should have been more specific about that.

@felix-hilden
Copy link
Owner

Fixed in the current release!

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

No branches or pull requests

2 participants