[GH-ISSUE #189] Error with get_artist #146

Closed
opened 2026-02-27 22:08:17 +03:00 by kerem · 0 comments
Owner

Originally created by @markegor on GitHub (Apr 14, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/189

When i call get_artist function in most cases it works perfectly. But when i called it for this channel "UC281fR3Rg1O08xpxArdbdew". I have an error:

Traceback (most recent call last):
File "./scripts/yt-music.py", line 6, in
Artist = ytmusic.get_artist('UC281fR3Rg1O08xpxArdbdew')
File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/mixins/browsing.py", line 316, in get_artist
artist.update(self.parser.parse_artist_contents(results))
File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/helpers.py", line 83, in _impl
return method(self, *method_args, **method_kwargs)
File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/browsing.py", line 153, in parse_artist_contents
artist[category]['results'] = parse_content_list(data[0]['contents'],
File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/browsing.py", line 162, in parse_content_list
contents.append(parse_func(result['musicTwoRowItemRenderer']))
File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/browsing.py", line 212, in parse_related_artist
'subscribers': nav(data, SUBTITLE).split(' ')[0],
File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 146, in nav
raise err
File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 140, in nav
root = root[k]
KeyError: 'runs'

Can you try to fix it PLEASE ?)

Originally created by @markegor on GitHub (Apr 14, 2021). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/189 When i call get_artist function in most cases it works perfectly. But when i called it for this channel "**UC281fR3Rg1O08xpxArdbdew**". I have an error: Traceback (most recent call last): File "./scripts/yt-music.py", line 6, in <module> Artist = ytmusic.get_artist('UC281fR3Rg1O08xpxArdbdew') File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/mixins/browsing.py", line 316, in get_artist artist.update(self.parser.parse_artist_contents(results)) File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/helpers.py", line 83, in _impl return method(self, *method_args, **method_kwargs) File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/browsing.py", line 153, in parse_artist_contents artist[category]['results'] = parse_content_list(data[0]['contents'], File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/browsing.py", line 162, in parse_content_list contents.append(parse_func(result['musicTwoRowItemRenderer'])) File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/browsing.py", line 212, in parse_related_artist 'subscribers': nav(data, SUBTITLE).split(' ')[0], File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 146, in nav raise err File "/home/markegor/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 140, in nav root = root[k] KeyError: 'runs' Can you try to fix it PLEASE ?)
kerem closed this issue 2026-02-27 22:08:17 +03:00
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#146
No description provided.