Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata fetch fails for movie - #61

Closed
KingJ opened this issue Jul 9, 2016 · 8 comments
Closed

Metadata fetch fails for movie - #61

KingJ opened this issue Jul 9, 2016 · 8 comments
Assignees
Labels

Comments

@KingJ
Copy link
Collaborator

KingJ commented Jul 9, 2016

After the AniDB API came back up (#59), I added a new movie to my library. However, when retrieving the metadata (either after performing a manual match or clicking refresh), Hama crashes with an attribute error;

2016-07-09 12:01:17,160 (7f9501ffb700) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/REMOVED
2016-07-09 12:01:17,161 (7f9501ffb700) :  DEBUG (runtime:49) - Received packed state data (1524 bytes)
2016-07-09 12:01:17,163 (7f9501ffb700) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/REMOVED
2016-07-09 12:01:17,163 (7f9501ffb700) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.hama://anidb-8821?lang=en
2016-07-09 12:01:17,164 (7f9501ffb700) :  DEBUG (model:234) - Deserializing from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/2/a92531bc068db400e4e5a395cfdf09fd49333db.bundle/Contents/com.plexapp.agents.hama/Info.xml
2016-07-09 12:01:17,165 (7f9501ffb700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/21266/tree'
2016-07-09 12:01:17,174 (7f9501ffb700) :  DEBUG (__init__:643) - --- Update Begin -------------------------------------------------------------------------------------------
2016-07-09 12:01:17,175 (7f9501ffb700) :  DEBUG (__init__:643) - Update - metadata source: 'anidb', id: '8821', Title: 'None',([...], [...], True)
2016-07-09 12:01:17,213 (7f9501ffb700) :  DEBUG (__init__:669) - anidbTvdbMapping() - anidb: '8821', tvbdid: '81115', tmdbid: '181522', imbdid: '', studio: '', defaulttvdbseason: '0', name: 'Magical Girl Lyrical Nanoha The Movie 2nd A's'
2016-07-09 12:01:17,217 (7f9501ffb700) :  DEBUG (networking:166) - Requesting 'http://tvthemes.plexapp.com/81115.mp3'
2016-07-09 12:01:17,622 (7f9501ffb700) :  ERROR (networking:217) - Error opening URL 'http://tvthemes.plexapp.com/81115.mp3'
2016-07-09 12:01:17,623 (7f9501ffb700) :  DEBUG (__init__:802) - metadata_download() - metadata_download - error downloading
2016-07-09 12:01:17,623 (7f9501ffb700) :  DEBUG (__init__:643) - Update() - TVDB - tvdbid: '81115', url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml'
2016-07-09 12:01:17,624 (7f9501ffb700) :  DEBUG (__init__:820) - xmlElementFromFile() - url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml', filename: 'TVDB/81115.xml'
2016-07-09 12:01:17,629 (7f9501ffb700) :  DEBUG (networking:161) - Fetching 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml' from the HTTP cache
2016-07-09 12:01:17,642 (7f9501ffb700) :  DEBUG (__init__:643) - Update() - IMDB ID was empty, loaded through tvdb serie xml, IMDBID: 'tt0808082'
2016-07-09 12:01:17,644 (7f9501ffb700) :  CRITICAL (agentkit:1067) - Exception in the update function of agent named 'HamaMovies', called with guid 'com.plexapp.agents.hama://anidb-8821?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1065, 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 878, in update
    def update(self, metadata, media, lang, force ): self.Update(metadata, media, lang, force,  True )
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/__init__.py", line 643, in Update
    elif len(media.seasons)>2 or max(map(int, media.seasons.keys()))>1:  keys = ["tvdbid: %s"  % (WEB_LINK % (TVDB_SERIE_URL  % tvdbid,  tvdbid) )]
AttributeError: 'MediaTree' object has no attribute 'seasons'
2016-07-09 12:01:17,645 (7f9501ffb700) :  DEBUG (model:229) - Serializing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/2/a92531bc068db400e4e5a395cfdf09fd49333db.bundle/Contents/com.plexapp.agents.hama/Info.xml
2016-07-09 12:01:17,647 (7f9501ffb700) :  DEBUG (runtime:88) - Sending packed state data (1548 bytes)
2016-07-09 12:01:17,647 (7f9501ffb700) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes

The contents of Metadata/Movies/2/a92531bc068db400e4e5a395cfdf09fd49333db.bundle/Contents/com.plexapp.agents.hama/Info.xml is;

`


<title_sort/>







<title/> `

I am using the latest versions of Hama and the Absolute Series Scanner as of the time of this issue submission. The PMS version is 1.0.0.2261.

I am able to refresh existing movies successfully, it's just this movie that appears to be having issues.

@ZeroQI
Copy link
Owner

ZeroQI commented Jul 9, 2016

HamaMovies so movie library used so media.seasons doesn't exist and we need to test for movie mode before testing seasons.

elif len(media.seasons)>2 or max(map(int, media.seasons.keys()))>1: keys = ["tvdbid: %s" % (WEB_LINK % (TVDB_SERIE_URL % tvdbid, tvdbid) )] AttributeError: 'MediaTree' object has no attribute 'seasons'

this should fix:
elif not movie and len(media.seasons)>2 or max(map(int, media.seasons.keys()))>1: keys = ["tvdbid: %s" % (WEB_LINK % (TVDB_SERIE_URL % tvdbid, tvdbid) )] AttributeError: 'MediaTree' object has no attribute 'seasons'

@ZeroQI
Copy link
Owner

ZeroQI commented Jul 10, 2016

https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/__init__.py
uploaded fix into master. please try it

@KingJ
Copy link
Collaborator Author

KingJ commented Jul 10, 2016

I just updated to master, restarted Plex and tried to refresh the item again, but I received the same result;

2016-07-10 22:44:53,894 (7fec43fff700) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/REMOVED
2016-07-10 22:44:53,895 (7fec43fff700) :  DEBUG (runtime:49) - Received packed state data (1044 bytes)
2016-07-10 22:44:53,897 (7fec43fff700) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/REMOVED
2016-07-10 22:44:53,897 (7fec43fff700) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.hama://anidb-8821?lang=en
2016-07-10 22:44:53,898 (7fec43fff700) :  DEBUG (model:234) - Deserializing from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/2/a92531bc068db400e4e5a395cfdf09fd49333db.bundle/Contents/com.plexapp.agents.hama/Info.xml
2016-07-10 22:44:53,899 (7fec43fff700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/21266/tree'
2016-07-10 22:44:53,904 (7fec43fff700) :  DEBUG (__init__:566) - --- Update Begin -------------------------------------------------------------------------------------------
2016-07-10 22:44:53,905 (7fec43fff700) :  DEBUG (__init__:566) - Update - metadata source: 'anidb', id: '8821', Title: 'None',([...], [...], True)
2016-07-10 22:44:53,942 (7fec43fff700) :  DEBUG (__init__:669) - anidbTvdbMapping() - anidb: '8821', tvbdid: '81115', tmdbid: '181522', imbdid: '', studio: '', defaulttvdbseason: '0', name: 'Magical Girl Lyrical Nanoha The Movie 2nd A's'
2016-07-10 22:44:53,947 (7fec43fff700) :  DEBUG (networking:166) - Requesting 'http://tvthemes.plexapp.com/81115.mp3'
2016-07-10 22:44:54,335 (7fec43fff700) :  ERROR (networking:217) - Error opening URL 'http://tvthemes.plexapp.com/81115.mp3'
2016-07-10 22:44:54,336 (7fec43fff700) :  DEBUG (__init__:802) - metadata_download() - metadata_download - error downloading
2016-07-10 22:44:54,336 (7fec43fff700) :  DEBUG (__init__:643) - Update() - TVDB - tvdbid: '81115', url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml'
2016-07-10 22:44:54,336 (7fec43fff700) :  DEBUG (__init__:820) - xmlElementFromFile() - url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml', filename: 'TVDB/81115.xml'
2016-07-10 22:44:54,342 (7fec43fff700) :  DEBUG (networking:161) - Fetching 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml' from the HTTP cache
2016-07-10 22:44:54,355 (7fec43fff700) :  DEBUG (__init__:643) - Update() - IMDB ID was empty, loaded through tvdb serie xml, IMDBID: 'tt0808082'
2016-07-10 22:44:54,356 (7fec43fff700) :  CRITICAL (agentkit:1067) - Exception in the update function of agent named 'HamaMovies', called with guid 'com.plexapp.agents.hama://anidb-8821?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1065, 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 878, in update
    def update(self, metadata, media, lang, force ): self.Update(metadata, media, lang, force,  True )
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/__init__.py", line 643, in Update
    elif len(media.seasons)>2 or max(map(int, media.seasons.keys()))>1:  keys = ["tvdbid: %s"  % (WEB_LINK % (TVDB_SERIE_URL  % tvdbid,  tvdbid) )]
AttributeError: 'MediaTree' object has no attribute 'seasons'
2016-07-10 22:44:54,357 (7fec43fff700) :  DEBUG (model:229) - Serializing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/2/a92531bc068db400e4e5a395cfdf09fd49333db.bundle/Contents/com.plexapp.agents.hama/Info.xml
2016-07-10 22:44:54,359 (7fec43fff700) :  DEBUG (runtime:88) - Sending packed state data (1068 bytes)
2016-07-10 22:44:54,360 (7fec43fff700) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes

I've double checked that my copy of __init__.py contains the change in ef17712 so i'm not sure why i'm still getting the same result.

@KingJ
Copy link
Collaborator Author

KingJ commented Jul 11, 2016

I saw @EndOfLine369 changed line 325 as well in commit 385e10a. I've just updated my copy of Hama and restarted Plex. This time around, I was able to successfully refresh the movie and pull in the correct data 😄 . Many thanks to both of you for fixing this!

I checked the log afterwards however and the same exception is still triggered despite the successful metadata refresh.

2016-07-11 19:26:10,133 (7fd6ecff9700) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/REMOVED
2016-07-11 19:26:10,134 (7fd6ecff9700) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2016-07-11 19:26:10,135 (7fd6ecff9700) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/REMOVED
2016-07-11 19:26:10,135 (7fd6ecff9700) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.hama://anidb-8821?lang=en
2016-07-11 19:26:10,137 (7fd6ecff9700) :  DEBUG (model:234) - Deserializing from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/2/a92531bc068db400e4e5a395cfdf09fd49333db.bundle/Contents/com.plexapp.agents.hama/Info.xml
2016-07-11 19:26:10,139 (7fd6ecff9700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/21266/tree'
2016-07-11 19:26:10,145 (7fd6ecff9700) :  DEBUG (__init__:566) - --- Update Begin -------------------------------------------------------------------------------------------
2016-07-11 19:26:10,145 (7fd6ecff9700) :  DEBUG (__init__:643) - Update - metadata source: 'anidb', id: '8821', Title: 'None',([...], [...], True)
2016-07-11 19:26:10,182 (7fd6ecff9700) :  DEBUG (__init__:669) - anidbTvdbMapping() - anidb: '8821', tvbdid: '81115', tmdbid: '181522', imbdid: '', studio: '', defaulttvdbseason: '0', name: 'Magical Girl Lyrical Nanoha The Movie 2nd A's'
2016-07-11 19:26:10,187 (7fd6ecff9700) :  DEBUG (networking:166) - Requesting 'http://tvthemes.plexapp.com/81115.mp3'
2016-07-11 19:26:10,594 (7fd6ecff9700) :  ERROR (networking:217) - Error opening URL 'http://tvthemes.plexapp.com/81115.mp3'
2016-07-11 19:26:10,594 (7fd6ecff9700) :  DEBUG (__init__:802) - metadata_download() - metadata_download - error downloading
2016-07-11 19:26:10,595 (7fd6ecff9700) :  DEBUG (__init__:643) - Update() - TVDB - tvdbid: '81115', url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml'
2016-07-11 19:26:10,595 (7fd6ecff9700) :  DEBUG (__init__:820) - xmlElementFromFile() - url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml', filename: 'TVDB/81115.xml'
2016-07-11 19:26:10,601 (7fd6ecff9700) :  DEBUG (networking:161) - Fetching 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/all/en.xml' from the HTTP cache
2016-07-11 19:26:10,615 (7fd6ecff9700) :  DEBUG (__init__:643) - Update() - IMDB ID was empty, loaded through tvdb serie xml, IMDBID: 'tt0808082'
2016-07-11 19:26:10,705 (7fd6ecff9700) :  DEBUG (__init__:643) - Update() - TVDB - Episodes with Summary: ['s0e10', 's1e1', 's1e10', 's1e11', 's1e12', 's1e13', 's1e2', 's1e3', 's1e4', 's1e5', 's1e6', 's1e7', 's1e8', 's1e9', 's2e1', 's2e10', 's2e11', 's2e12', 's2e13', 's2e2', 's2e3', 's2e4', 's2e5', 's2e6', 's2e7', 's2e8', 's2e9', 's3e1', 's3e10', 's3e11', 's3e12', 's3e13', 's3e14', 's3e15', 's3e16', 's3e17', 's3e18', 's3e19', 's3e2', 's3e20', 's3e21', 's3e22', 's3e23', 's3e24', 's3e25', 's3e26', 's3e3', 's3e4', 's3e5', 's3e6', 's3e7', 's3e8', 's3e9']
2016-07-11 19:26:10,705 (7fd6ecff9700) :  DEBUG (__init__:643) - Update() - TVDB - Episodes without Summary: ['s4e1', 's4e10', 's4e11', 's4e12', 's4e2', 's4e3', 's4e4', 's4e5', 's4e6', 's4e7', 's4e8', 's4e9']
2016-07-11 19:26:10,711 (7fd6ecff9700) :  DEBUG (networking:166) - Requesting 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/banners.xml'
2016-07-11 19:26:10,931 (7fd6ecff9700) :  DEBUG (__init__:730) - getImagesFromTVDB() - Loaded picture XML: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/81115/banners.xml'
2016-07-11 19:26:10,935 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/fanart/original/81115-4.jpg', num: '2', filename: 'TVDB/fanart/original/81115-4.jpg'
2016-07-11 19:26:10,936 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/fanart/original/81115-6.jpg', num: '3', filename: 'TVDB/fanart/original/81115-6.jpg'
2016-07-11 19:26:10,937 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/fanart/original/81115-2.jpg', num: '4', filename: 'TVDB/fanart/original/81115-2.jpg'
2016-07-11 19:26:10,939 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/fanart/original/81115-1.jpg', num: '5', filename: 'TVDB/fanart/original/81115-1.jpg'
2016-07-11 19:26:10,941 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/fanart/original/81115-5.jpg', num: '6', filename: 'TVDB/fanart/original/81115-5.jpg'
2016-07-11 19:26:10,942 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/fanart/original/81115-3.jpg', num: '7', filename: 'TVDB/fanart/original/81115-3.jpg'
2016-07-11 19:26:10,946 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/posters/81115-2.jpg', num: '1', filename: 'TVDB/posters/81115-2.jpg'
2016-07-11 19:26:10,949 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/posters/81115-1.jpg', num: '3', filename: 'TVDB/posters/81115-1.jpg'
2016-07-11 19:26:10,953 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://thetvdb.com/banners/posters/81115-3.jpg', num: '4', filename: 'TVDB/posters/81115-3.jpg'
2016-07-11 19:26:10,953 (7fd6ecff9700) :  DEBUG (__init__:740) - getImagesFromTVDB() - Setting season '3' to '4' with offset of '-1'
2016-07-11 19:26:10,954 (7fd6ecff9700) :  DEBUG (__init__:740) - getImagesFromTVDB() - Setting season '3' to '4' with offset of '-1'
2016-07-11 19:26:10,954 (7fd6ecff9700) :  DEBUG (__init__:740) - getImagesFromTVDB() - Setting season '2' to '3' with offset of '-1'
2016-07-11 19:26:10,955 (7fd6ecff9700) :  DEBUG (__init__:740) - getImagesFromTVDB() - Setting season '0' to '1' with offset of '-1'
2016-07-11 19:26:10,955 (7fd6ecff9700) :  DEBUG (__init__:740) - getImagesFromTVDB() - Setting season '4' to '5' with offset of '-1'
2016-07-11 19:26:10,956 (7fd6ecff9700) :  DEBUG (__init__:740) - getImagesFromTVDB() - Setting season '2' to '3' with offset of '-1'
2016-07-11 19:26:10,956 (7fd6ecff9700) :  DEBUG (__init__:740) - getImagesFromTVDB() - Setting season '1' to '2' with offset of '-1'
2016-07-11 19:26:10,957 (7fd6ecff9700) :  DEBUG (__init__:740) - getImagesFromTVDB() - Setting season '1' to '2' with offset of '-1'
2016-07-11 19:26:10,964 (7fd6ecff9700) :  DEBUG (networking:161) - Fetching 'https://api.tmdb.org/3/configuration?api_key=7f4a0bd0bd3315bb832e17feda70b5cd' from the HTTP cache
2016-07-11 19:26:10,969 (7fd6ecff9700) :  DEBUG (__init__:760) - getImagesFromTMDB() - using IMDBID url: https://api.tmdb.org/3/find/tt0808082?api_key=7f4a0bd0bd3315bb832e17feda70b5cd&external_source=imdb_id
2016-07-11 19:26:10,973 (7fd6ecff9700) :  DEBUG (networking:166) - Requesting 'https://api.tmdb.org/3/find/tt0808082?api_key=7f4a0bd0bd3315bb832e17feda70b5cd&external_source=imdb_id'
2016-07-11 19:26:13,444 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://image.tmdb.org/t/p/original/m48j45ejhgvGVy9VQzUdqdLDL6G.jpg', num: '90', filename: 'TMDB/tt0808082-art.jpg'
2016-07-11 19:26:13,445 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://image.tmdb.org/t/p/original/vgy87kEnqH2KhKtx90enymKm0Vy.jpg', num: '90', filename: 'TMDB/tt0808082.jpg'
2016-07-11 19:26:13,445 (7fd6ecff9700) :  DEBUG (__init__:786) - getImagesFromOMDB() - imdbid: 'tt0808082', url: 'http://www.omdbapi.com/?i=tt0808082', filename: 'OMDB/tt0808082.jpg'
2016-07-11 19:26:13,452 (7fd6ecff9700) :  DEBUG (networking:161) - Fetching 'http://www.omdbapi.com/?i=tt0808082' from the HTTP cache
2016-07-11 19:26:13,458 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://ia.media-imdb.com/images/M/MV5BNDQ0NTA1MzA2Ml5BMl5BanBnXkFtZTcwOTg5NjkxMg@@._V1_SX300.jpg', num: '98', filename: 'OMDB/tt0808082.jpg'
2016-07-11 19:26:13,458 (7fd6ecff9700) :  DEBUG (__init__:643) - Update() - AniDB mode - AniDB Serie XML: http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8821, AniDB/8821.xml
2016-07-11 19:26:13,459 (7fd6ecff9700) :  DEBUG (__init__:820) - xmlElementFromFile() - url: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8821', filename: 'AniDB/8821.xml'
2016-07-11 19:26:17,466 (7fd6ecff9700) :  DEBUG (networking:166) - Requesting 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8821'
2016-07-11 19:26:17,923 (7fd6ecff9700) :  DEBUG (__init__:425) - Update() - AniDB title: 'Magical Girl Lyrical Nanoha The Movie 2nd A's', original title: 'Magical Girl Lyrical Nanoha The Movie 2nd A's', metadata.title 'None'
2016-07-11 19:26:17,927 (7fd6ecff9700) :  DEBUG (__init__:643) - Update() - AniDB Start Date: '2012-07-14'
2016-07-11 19:26:17,928 (7fd6ecff9700) :  DEBUG (__init__:643) - update() - AniDB Ratings:    '8.41'
2016-07-11 19:26:17,940 (7fd6ecff9700) :  DEBUG (__init__:643) - Update() - genres: [('Magic', 600), ('Contemporary Fantasy', 600), ('Fantasy', 600), ('Present', 600), ('Action', 400), ('Henshin', 300), ('Friendship', 300), ('Tragedy', 200), ('Shoujo Ai', 200), ('School Life', 100), ('Erotic Game', 0), ('Seinen', 0), ('Romance', 0), ('Alien', 0), ('Game', 0), ('Adventure', 0)] ['Magic', 'Contemporary Fantasy', 'Fantasy', 'Present', 'Action', 'Henshin', 'Friendship', 'Tragedy', 'Shoujo Ai', 'School Life', 'Erotic Game', 'Seinen', 'Romance', 'Alien', 'Game', 'Adventure']
2016-07-11 19:26:17,940 (7fd6ecff9700) :  DEBUG (__init__:643) - AniDB Genres (Weight): Magic (600) Contemporary Fantasy (600) Fantasy (600) Present (600) Action (400) Henshin (300) Friendship (300) Tragedy (200) Shoujo Ai (200) School Life (100) Erotic Game (0) Seinen (0) Romance (0) Alien (0) Game (0) Adventure (0)
2016-07-11 19:26:17,942 (7fd6ecff9700) :  DEBUG (__init__:690) - anidbCollectionMapping() - anidbid '8821' is part of movie collection: Magical Girl Lyrical Nanoha Collection', related_anime_list: '['9788', '6075', '3440']',
2016-07-11 19:26:17,943 (7fd6ecff9700) :  DEBUG (__init__:643) - AniDB Creator data: Seven Arcs is a studio, Tsuzuki Masaki is a writer, Kusakawa Keizou is a director, Okuda Yasuhiro is a director,
2016-07-11 19:26:17,944 (7fd6ecff9700) :  DEBUG (__init__:643) - AniDB series summary is missing but TVDB has one availabe so using it.
2016-07-11 19:26:17,945 (7fd6ecff9700) :  DEBUG (__init__:643) - Update() - AniDB Poster, url: 'http://img7.anidb.net/pics/anime/79027.jpg'
2016-07-11 19:26:17,948 (7fd6ecff9700) :  DEBUG (networking:166) - Requesting 'http://img7.anidb.net/pics/anime/79027.jpg'
2016-07-11 19:26:18,466 (7fd6ecff9700) :  DEBUG (networking:198) - Not caching 'http://img7.anidb.net/pics/anime/79027.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2016-07-11 19:26:18,467 (7fd6ecff9700) :  DEBUG (__init__:810) - metadata_download() - url: 'http://img7.anidb.net/pics/anime/79027.jpg', num: '99', filename: 'AniDB/79027.jpg'
2016-07-11 19:26:18,467 (7fd6ecff9700) :  DEBUG (__init__:643) - Locked 'anime-list anidbid missing' [True, 1468261578]
2016-07-11 19:26:18,468 (7fd6ecff9700) :  DEBUG (__init__:648) - Unlocked 'anime-list anidbid missing' [False, 0]
2016-07-11 19:26:18,469 (7fd6ecff9700) :  DEBUG (__init__:643) - Locked 'anime-list studio logos' [True, 1468261578]
2016-07-11 19:26:18,471 (7fd6ecff9700) :  DEBUG (__init__:648) - Unlocked 'anime-list studio logos' [False, 0]
2016-07-11 19:26:18,472 (7fd6ecff9700) :  DEBUG (__init__:643) - Locked 'AniDB summaries missing' [True, 1468261578]
2016-07-11 19:26:18,472 (7fd6ecff9700) :  DEBUG (__init__:648) - Unlocked 'AniDB summaries missing' [False, 0]
2016-07-11 19:26:18,473 (7fd6ecff9700) :  DEBUG (__init__:643) - Locked 'Plex themes missing' [True, 1468261578]
2016-07-11 19:26:18,474 (7fd6ecff9700) :  DEBUG (__init__:648) - Unlocked 'Plex themes missing' [False, 0]
2016-07-11 19:26:18,474 (7fd6ecff9700) :  DEBUG (__init__:643) - Locked 'TVDB posters missing' [True, 1468261578]
2016-07-11 19:26:18,475 (7fd6ecff9700) :  DEBUG (__init__:648) - Unlocked 'TVDB posters missing' [False, 0]
2016-07-11 19:26:18,475 (7fd6ecff9700) :  DEBUG (__init__:643) - Locked 'Missing Specials' [True, 1468261578]
2016-07-11 19:26:18,476 (7fd6ecff9700) :  CRITICAL (agentkit:1067) - Exception in the update function of agent named 'HamaMovies', called with guid 'com.plexapp.agents.hama://anidb-8821?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1065, 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 878, in update
    def update(self, metadata, media, lang, force ): self.Update(metadata, media, lang, force,  True )
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/__init__.py", line 643, in Update
    elif len(media.seasons)>2 or max(map(int, media.seasons.keys()))>1:  keys = ["tvdbid: %s"  % (WEB_LINK % (TVDB_SERIE_URL  % tvdbid,  tvdbid) )]
AttributeError: 'MediaTree' object has no attribute 'seasons'
2016-07-11 19:26:18,484 (7fd6ecff9700) :  DEBUG (model:229) - Serializing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/2/a92531bc068db400e4e5a395cfdf09fd49333db.bundle/Contents/com.plexapp.agents.hama/Info.xml
2016-07-11 19:26:18,486 (7fd6ecff9700) :  DEBUG (runtime:88) - Sending packed state data (1548 bytes)
2016-07-11 19:26:18,487 (7fd6ecff9700) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes

EndOfLine369 added a commit that referenced this issue Jul 12, 2016
@EndOfLine369
Copy link
Collaborator

Fix committed

@EndOfLine369 EndOfLine369 self-assigned this Jul 12, 2016
@ZeroQI
Copy link
Owner

ZeroQI commented Jul 12, 2016

you never had an issue on line 325... corrected at the wrong place...
Thanks EndOfLine369 for fixing

@KingJ
Copy link
Collaborator Author

KingJ commented Jul 12, 2016

I just updated Hama, restarted Plex, removed the file, rescanned to remove from library, put the file back, rescanned to re-add and Hama correctly loaded the metadata with no errors in the log 😄 .

Thanks again to both of you for helping fix this. I'll close the issue now.

@KingJ KingJ closed this as completed Jul 12, 2016
@EndOfLine369
Copy link
Collaborator

Good to hear all's well 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants