ZeroQI / Hama.bundle

Plex HTTP Anidb Metadata Agent (HAMA)
GNU General Public License v3.0
1.21k stars 113 forks source link

No metadata, stacktrace in logs #343

Closed bayang closed 5 years ago

bayang commented 5 years ago

Hi,

previously, adding anime worked fine, but I tried to add some yesterday and association is ok but no metadata appear. To be more specific, I tried to add anime planetes, the anime title is replaced by Planetes [anidb-895], that is what makes me think that the association part is ok.

Screenshot_20190908_135859

Nevertheless in /Plex\ Media\ Server/Plug-in\ Support/Data/com.plexapp.agents.hama/DataItems/_Logs/japanimeDD/_root_.agent.log I have this :

2019-09-08 13:29:33,489 - 7fb2f3fff700 - ==== common.PlexLog(file="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/_Logs/japanimeDD/planetes.agent-update.log")
2019-09-08 13:29:33,532 - 7fb2f3fff700 - Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-895?lang=fr' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-1e5ff713d/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/__init__.py", line 160, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/__init__.py", line 135, in Update
    dict_TheTVDB,                             IMDbid              =   TheTVDBv2.GetMetadata(media, movie, error_log, lang, source, AniDBid, TVDBid, IMDbid,         mappingList, Dict(AniDB, 'movie'))
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/TheTVDBv2.py", line 302, in GetMetadata
    SaveDict(('TheTVDB/'+image['fileName'], 1 if rank==3 else 3 if rank==1 else rank, thumbnail), TheTVDB_dict, 'seasons', '0' if str(image['subKey'])=='0' else '1', 'posters', TVDB_IMG_ROOT + image['fileName'])  #if anidb_numbering else str(image['subKey'])
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-1e5ff713d/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
KeyError: 'en'

2019-09-08 13:29:33,533 - 7fb2f3fff700 - Serializing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/TV Shows/8/ec06adcf0177bf0913ebe23365bdae8fb55b11e.bundle/Contents/com.plexapp.agents.hama/Info.xml

If I go to the first mentioned file ("/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/_Logs/japanimeDD/planetes.agent-update.log") I have all metadata from series.

In the second file (/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/TV Shows/8/ec06adcf0177bf0913ebe23365bdae8fb55b11e.bundle/Contents/com.plexapp.agents.hama/Info.xml) I have only empty xml tags.

<?xml version='1.0' encoding='utf-8'?>
<TV_Show id="anidb-895">
  <rating/>
  <title_sort/>
  <art/>
  <themes/>
  <posters/>
  <duration/>
  <genres/>
  <title/>
  <rating_count/>
  <collections/>
  <tags/>
  <audience_rating_image/>
  <rating_image/>
  <audience_rating/>
  <studio/>
  <seasons/>
  <originally_available_at/>
  <roles/>
  <countries/>
  <content_rating/>
  <original_title/>
  <summary/>
  <reviews/>
  <banners/>
  <similar/>
</TV_Show>

Plex is at latest version on Ubuntu 18.04.

I reinstalled ASS and Hama from the beginning and rescanned the libray, still same result. I I trigger a full library metadata rescan, older entries still have their metadata but stacktraces for those entries appear in logs as well.

I tried to remove files of library, rescan folder, reimport files, rescan folder, but no luck.

root.agent.log

planetes.agent-update.log

ZeroQI commented 5 years ago

Please test and close if resolved, should be normally.

bayang commented 5 years ago

It is fixed, many thanks for your hard work ! :)