Last.FM: KeyError: 'bio' breaks artist metadata

Server Version#: Latest PMS from Linuxserver.io
Player Version#: Plex Web via plex.tv
I am having the hardest time trying to get an artist to refresh (after changing from just 1 song in my library to both albums): bio and popular tracks. Using Premium Music Library and manually matching to the correct artist via match, and last.fm agent. I’ve already done the Plex dance 2x. Checking logs for various plugins, there seems to be multiple issues:

plexmusic.log:

019-03-06 17:35:48,594 (14a64e872700) :  ERROR (networking:219) - Error opening URL 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RHZXRFdmVudHM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_'
2019-03-06 17:35:48,595 (14a64e872700) :  CRITICAL (agentkit:1078) - Exception in the update function of agent named 'Plex Premium Music', called with guid 'com.plexapp.agents.plexmusic://gracenote/artist/0534E54130AE10DF?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ece95b3a1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ece95b3a1/PlexMusic.bundle/Contents/Code/__init__.py", line 323, in update
    metadata.summary = String.DecodeHTMLEntities(String.StripTags(lastfm_artist['bio']['content'][:lastfm_artist['bio']['content'].find('\n\n')]).strip())
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ece95b3a1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
KeyError: 'bio'

lastfm.log:

2019-03-06 17:50:26,775 (14e076ef7700) :  DEBUG (networking:166) - Requesting 'http://lastfm-z.plexapp.com/2.0/?method=artist.getInfo&artist=snail%20mail&autocorrect=1&lang=en&format=json&api_key=d5310352469c2631e5976d0f4a599773'
2019-03-06 17:50:26,911 (14e076ef7700) :  DEBUG (networking:166) - Requesting 'http://lastfm-z.plexapp.com/2.0/?method=artist.getInfo&artist=snail%20mail&autocorrect=1&lang=en&format=json&api_key=d5310352469c2631e5976d0f4a599773'
2019-03-06 17:50:27,884 (14e0773f9700) :  INFO (__init__:182) - Skipping Snail Mail plays with only 2 listeners and score of 75.
2019-03-06 17:50:27,885 (14e0773f9700) :  INFO (__init__:182) - Skipping Snail Mail's New Song Gives Partying A Profound Meaning with only 9 listeners and score of 58.
2019-03-06 17:50:27,886 (14e0773f9700) :  INFO (__init__:182) - Skipping Snail Mail's Lindsey Jordan Has Absolutely Been Touched By a Ghost with only 5 listeners and score of 57.
2019-03-06 17:50:27,887 (14e0773f9700) :  INFO (__init__:182) - Skipping Open Up w/ Snail Mail with only 16 listeners and score of 71.
2019-03-06 17:50:27,887 (14e0773f9700) :  INFO (__init__:182) - Skipping Snail Mail - Lush with only 1 listeners and score of 79.
2019-03-06 17:50:27,888 (14e0773f9700) :  DEBUG (networking:166) - Requesting 'http://lastfm-z.plexapp.com/2.0/?method=artist.getInfo&artist=snail%20mail&autocorrect=1&lang=en&format=json&api_key=d5310352469c2631e5976d0f4a599773'
2019-03-06 17:50:28,021 (14e0773f9700) :  DEBUG (networking:166) - Requesting 'http://lastfm-z.plexapp.com/2.0/?method=artist.getInfo&artist=snail%20mail&autocorrect=1&lang=en&format=json&api_key=d5310352469c2631e5976d0f4a599773'
2019-03-06 17:50:28,147 (14e0773f9700) :  WARNING (data:179) - Error decoding with simplejson, using demjson instead (this will cause a performance hit) - Expecting value: line 1 column 1 (char 0)
2019-03-06 17:50:28,147 (14e0773f9700) :  INFO (__init__:795) - Error fetching JSON.
2019-03-06 17:50:28,148 (14e0773f9700) :  INFO (__init__:672) - Error retrieving artist metadata.
2019-03-06 17:50:28,149 (14e0773f9700) :  DEBUG (runtime:88) - Sending packed state data (590 bytes)
2019-03-06 17:50:28,149 (14e0773f9700) :  DEBUG (runtime:924) - Response: [200] str, 28 bytes
2019-03-06 17:50:28,155 (14e0773f9700) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RNYmlkTG9va3Vw/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_
2019-03-06 17:50:28,156 (14e0773f9700) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2019-03-06 17:50:28,158 (14e0773f9700) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RNYmlkTG9va3Vw/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_
2019-03-06 17:50:28,158 (14e0773f9700) :  INFO (__init__:79) - Couldn't find MBID.
2019-03-06 17:50:28,158 (14e0773f9700) :  DEBUG (runtime:88) - Sending packed state data (106 bytes)
2019-03-06 17:50:28,159 (14e0773f9700) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes
2019-03-06 17:50:36,099 (14e076ef7700) :  WARNING (data:179) - Error decoding with simplejson, using demjson instead (this will cause a performance hit) - Expecting value: line 1 column 1 (char 0)
2019-03-06 17:50:36,099 (14e076ef7700) :  INFO (__init__:795) - Error fetching JSON.
2019-03-06 17:50:36,100 (14e076ef7700) :  INFO (__init__:672) - Error retrieving artist metadata.
2019-03-06 17:50:36,101 (14e076ef7700) :  DEBUG (runtime:88) - Sending packed state data (590 bytes)
2019-03-06 17:50:36,101 (14e076ef7700) :  DEBUG (runtime:924) - Response: [200] str, 28 bytes
2019-03-06 17:50:42,005 (14e076ef7700) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RHZXRFdmVudHM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_
2019-03-06 17:50:42,006 (14e076ef7700) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2019-03-06 17:50:42,007 (14e076ef7700) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RHZXRFdmVudHM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_
2019-03-06 17:50:42,008 (14e076ef7700) :  INFO (__init__:79) - Couldn't find MBID.
2019-03-06 17:50:42,008 (14e076ef7700) :  CRITICAL (messaging:108) - Exception in _process_function_call (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ece95b3a1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/messaging.py", line 103, in _process_function_call
    result = self._functions[name](*args, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ece95b3a1/LastFM.bundle/Contents/Code/__init__.py", line 149, in ArtistGetEvents
    artist_songkickid = GetArtistSongkickId(lastfm_artist['name'])
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ece95b3a1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
KeyError: 'name'

Plex Media Server.log:

Mar 06, 2019 17:38:50.376 [0x14f7f784b700] WARN - JobManager: Could not find job for handle 431
Mar 06, 2019 17:39:28.205 [0x14f7998ea700] WARN - No matches for search.
Mar 06, 2019 17:39:28.264 [0x14f7998ea700] WARN - No matches for search.
Mar 06, 2019 17:40:45.965 [0x14f7f784b700] WARN - JobManager: Could not find job for handle 671
Mar 06, 2019 17:41:06.090 [0x14f7f784b700] WARN - JobManager: Could not find job for handle 2210

Docker log:

GUI: Requesting metadata for 'Lush'
__code__:487: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
__code__:500: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
GUI: Requesting metadata for 'Habit'
GUI: Requesting metadata for 'Lush'

Artist is Snail Mail:

As I said in the op, I did the dance twice unfortunately. Even restarted the Plex container after step 5 to be sure both times.

To be clear, the albums shown up in last fm agent. It’s the artist bio and popular track info that is breaking:

I am not sure what more to say. As in first post, I already am using premium, I am matching with last.fm, and I’ve already done the plex dance (which includes clearing http caches). Tried again today same result.

Are you testing with 1.15.1.710? This is what I am on.

Even if those were the issues, I am not sure why there are so many errors in the logs.

I am still having this exact same issue. I did have the gateway rebooted unfortunately (power outage), and nothing has changed. No connection issues for any other artists or Plex server. I did the Plex dance once again for giggles with the same issue.

The native app is not an option. I am using unRAID, with the intention of using dockerized services, to keep everything separated.

Again, starting from scratch here (removed files from music dir, re-scanned, clear bundles/empty trash, clear http caches, manually delete metadata entries in metadata/artists/, restart docker container), and these are the logs with same error:

com.plexapp.agents.plexmusic.log

2019-03-23 22:45:06,081 (147e3719d700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/335078/tree'
2019-03-23 22:45:06,092 (147e3719d700) :  INFO (__init__:230) - Updating: Snail Mail (GUID: com.plexapp.agents.plexmusic://gracenote/artist/055D72C530315E02?lang=en)
2019-03-23 22:45:06,093 (147e3719d700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/services/gracenote/update?guid=com.plexapp.agents.plexmusic%3A%2F%2Fgracenote%2Falbum%2F0534E54130AE10DF%2F816713951-34E54183BAD55E95E3C1CBFE390B16D5%3Flang%3Den'
2019-03-23 22:45:06,105 (147e3719d700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RTZWFyY2g_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKbGlzdAozCnMyCmVuczQKbGFuZ3IxCnM2CmFsYnVtc3UxMApTbmFpbCBNYWlsczYKYXJ0aXN0MgpzNApMdXNoczUKSGFiaXRyMAo_'
2019-03-23 22:45:06,400 (147e3719d700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RNYmlkTG9va3Vw/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_'
2019-03-23 22:45:06,410 (147e3719d700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.htbackdrops/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RTZWFyY2g_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQp1MTAKU25haWwgTWFpbHMxMQphcnRpc3RfbmFtZXIwCg__'
2019-03-23 22:45:08,595 (147e3719d700) :  ERROR (networking:219) - Error opening URL 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.htbackdrops/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RTZWFyY2g_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQp1MTAKU25haWwgTWFpbHMxMQphcnRpc3RfbmFtZXIwCg__'
2019-03-23 22:45:08,595 (147e3719d700) :  INFO (Artist:76) - Couldn't fetch HTBackdrops artist.
2019-03-23 22:45:08,597 (147e3719d700) :  DEBUG (networking:166) - Requesting 'https://meta.plex.tv/a/snail_mail'
2019-03-23 22:45:08,639 (147e3719d700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RHZXRFdmVudHM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_'
2019-03-23 22:45:08,648 (147e3719d700) :  ERROR (networking:219) - Error opening URL 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RHZXRFdmVudHM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_'
2019-03-23 22:45:08,649 (147e3719d700) :  CRITICAL (agentkit:1078) - Exception in the update function of agent named 'Plex Premium Music', called with guid 'com.plexapp.agents.plexmusic://gracenote/artist/055D72C530315E02?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/PlexMusic.bundle/Contents/Code/__init__.py", line 323, in update
    metadata.summary = String.DecodeHTMLEntities(String.StripTags(lastfm_artist['bio']['content'][:lastfm_artist['bio']['content'].find('\n\n')]).strip())
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
KeyError: 'bio'

com.plexapp.agents.lastfm.log

2019-03-23 22:45:06,113 (14e117026700) :  INFO (__init__:201) - Fetching artist's albums and applying album bonus.
2019-03-23 22:45:06,115 (14e117026700) :  DEBUG (networking:161) - Fetching 'http://lastfm-z.plexapp.com/2.0/?method=artist.gettopalbums&artist=snail%20mail&page=1&limit=50&format=json&api_key=d5310352469c2631e5976d0f4a599773' from the HTTP cache
2019-03-23 22:45:06,139 (14e117026700) :  INFO (__init__:225) - Applying album bonus of: 2
2019-03-23 22:45:06,140 (14e117026700) :  INFO (__init__:187) - Artist result: Snail Mail dist: -1 album bonus: 2 listeners: 106397 score: 93
2019-03-23 22:45:06,141 (14e117026700) :  DEBUG (networking:166) - Requesting 'http://lastfm-z.plexapp.com/2.0/?method=artist.getInfo&artist=snail%20mail&autocorrect=1&lang=en&format=json&api_key=d5310352469c2631e5976d0f4a599773'
2019-03-23 22:45:06,271 (14e117026700) :  DEBUG (networking:166) - Requesting 'http://lastfm-z.plexapp.com/2.0/?method=artist.getInfo&artist=snail%20mail&autocorrect=1&lang=en&format=json&api_key=d5310352469c2631e5976d0f4a599773'
2019-03-23 22:45:06,395 (14e117026700) :  WARNING (data:179) - Error decoding with simplejson, using demjson instead (this will cause a performance hit) - Expecting value: line 1 column 1 (char 0)
2019-03-23 22:45:06,395 (14e117026700) :  INFO (__init__:795) - Error fetching JSON.
2019-03-23 22:45:06,396 (14e117026700) :  INFO (__init__:672) - Error retrieving artist metadata.
2019-03-23 22:45:06,396 (14e117026700) :  DEBUG (runtime:88) - Sending packed state data (590 bytes)
2019-03-23 22:45:06,397 (14e117026700) :  DEBUG (runtime:924) - Response: [200] str, 28 bytes
2019-03-23 22:45:06,403 (14e117026700) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RNYmlkTG9va3Vw/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_
2019-03-23 22:45:06,404 (14e117026700) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2019-03-23 22:45:06,405 (14e117026700) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RNYmlkTG9va3Vw/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_
2019-03-23 22:45:06,406 (14e117026700) :  INFO (__init__:79) - Couldn't find MBID.
2019-03-23 22:45:06,407 (14e117026700) :  DEBUG (runtime:88) - Sending packed state data (106 bytes)
2019-03-23 22:45:06,407 (14e117026700) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes
2019-03-23 22:45:08,642 (14e117026700) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RHZXRFdmVudHM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_
2019-03-23 22:45:08,643 (14e117026700) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2019-03-23 22:45:08,644 (14e117026700) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpBcnRpc3RHZXRFdmVudHM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAoxCnIxCnMxMwpsYXN0Zm1fYXJ0aXN0MApyMAo_
2019-03-23 22:45:08,645 (14e117026700) :  INFO (__init__:79) - Couldn't find MBID.
2019-03-23 22:45:08,645 (14e117026700) :  CRITICAL (messaging:108) - Exception in _process_function_call (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/messaging.py", line 103, in _process_function_call
    result = self._functions[name](*args, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/LastFM.bundle/Contents/Code/__init__.py", line 149, in ArtistGetEvents
    artist_songkickid = GetArtistSongkickId(lastfm_artist['name'])
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
KeyError: 'name'

To me, it looks very clear that it is encountering an error, which causes no data after the bio to be loaded. But maybe you do not believe me. I can make a video of the exact process if you still don’t think so.

EDIT: I had some extra time, so I fired up a new fresh plex docker instance separate from my main. Only added music folder for Snail mail, used Plex premium music for the library. Same exact issue in the logs. This issue is 100% reproducible.

EDIT 2: Same issue occurs on official Plexinc docker image as on linuxserver.io image. Tried both with fresh dbs/new setup, same result in logs from both.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.