nojusr / paprika

A fork of Taigabot3 for which I'm writing a ton of core user plugins.
Other
2 stars 1 forks source link

for some reason byyz cannot check his last.fm #21

Closed nojusr closed 4 years ago

nojusr commented 5 years ago

Here's a traceback:

Task exception was never retrieved
future: <Task finished coro=<nowplaying() done, defined at /home/nojus/programming/paprika/plugins/last-fm.py:128> exception=KeyError('toptags')>
Traceback (most recent call last):
  File "/home/nojus/programming/paprika/plugins/last-fm.py", line 190, in nowplaying
    tags = _pull_track_tags(lastfm_key, title, artist)
  File "/home/nojus/programming/paprika/plugins/last-fm.py", line 75, in _pull_track_tags
    tags_json = response.json()['toptags']['tag'][0:5]
KeyError: 'toptags'
typing-noise commented 5 years ago

it works with mymusichistory and mymusichistory_ but not with a single

nojusr commented 5 years ago

i think it has to do with the fact that his current song has no tags and therefore it screws up the json parsing

ineeee commented 5 years ago

songs with no tags work fine:

<ine> .np adrift
<paprika> adrift is listening to "Scopes" [-snip-], Play count: 1, Tags: none.
nojusr commented 4 years ago

seems to be a specific case, i cannot tell what's going wrong with it.