[GH-ISSUE #17] get_playlist() fails if description is blank #12

Closed
opened 2026-02-27 22:07:33 +03:00 by kerem · 1 comment
Owner

Originally created by @beville on GitHub (May 16, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/17

If I call get_playlist() on a playlist without a description I get:

Traceback (most recent call last):
  File "./ytmusic.py", line 100, in <module>
    main()
  File "./ytmusic.py", line 71, in main
    clear_playlist(ytmusic, playlist_id)
  File "./ytmusic.py", line 43, in clear_playlist
    playlist = ytmusic.get_playlist(id, limit=100)
  File "/usr/local/lib/python3.8/dist-packages/ytmusicapi/ytmusic.py", line 721, in get_playlist
    playlist['description'] = header['description']['runs'][0]['text']
KeyError: 'description'

If I fill in a description via the web UI, the call works. After I remove the value in the web UI, the call fails again.

Originally created by @beville on GitHub (May 16, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/17 If I call get_playlist() on a playlist without a description I get: ``` Traceback (most recent call last): File "./ytmusic.py", line 100, in <module> main() File "./ytmusic.py", line 71, in main clear_playlist(ytmusic, playlist_id) File "./ytmusic.py", line 43, in clear_playlist playlist = ytmusic.get_playlist(id, limit=100) File "/usr/local/lib/python3.8/dist-packages/ytmusicapi/ytmusic.py", line 721, in get_playlist playlist['description'] = header['description']['runs'][0]['text'] KeyError: 'description' ``` If I fill in a description via the web UI, the call works. After I remove the value in the web UI, the call fails again.
kerem closed this issue 2026-02-27 22:07:33 +03:00
Author
Owner

@st-den commented on GitHub (May 16, 2020):

Thanks for the report! This should be resolved soon.

<!-- gh-comment-id:629689162 --> @st-den commented on GitHub (May 16, 2020): Thanks for the report! This should be resolved soon.
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/ytmusicapi#12
No description provided.