[mythtv-commits] Ticket #13510: Several TV metadata retrievals are failing
MythTV
noreply at mythtv.org
Thu Nov 14 23:06:24 UTC 2019
#13510: Several TV metadata retrievals are failing
---------------------------------------------+--------------------------
Reporter: steveerl | Owner: JYA
Type: Bug Report - General | Status: new
Priority: minor | Milestone: needs_triage
Component: MythTV - Mythmetadatalookup | Version: Master Head
Severity: medium | Keywords: metadata
Ticket locked: 0 |
---------------------------------------------+--------------------------
Metadata retrieval for a bunch of my recording rules failed, starting on
November 13, 2019. These recording types have previously worked fine. The
affected titles were:
**Chicago Med**, **Chicago Fire**, **Chicago P.D.**, **Riverdale**,
**Nancy Drew (2019)**, **Full Frontal with Samantha Bee**
To debug, I ran, by hand, the metadata retrieval commands which are
invoked by mythtv.
{{{
terra[66] /usr/share/mythtv/metadata/Television/ttvdb.py -l en -a US -M
"Full Frontal With Samantha Bee"
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
<item>
<language>en</language>
<title>Full Frontal with Samantha Bee</title>
<inetref>303438</inetref>
<collectionref>303438</collectionref>
<description>Applying her smart and satirical point of view to current
and relevant issues, Samantha Bee provides her nuanced perspective on
world events, repartees with newsmakers from across ideological spectrums
and stabs injustice with the hot poker of comedy.</description>
<releasedate>2015-5-5</releasedate>
<images>
<image type="banner"
url="http://www.thetvdb.com/banners//banners/posters/303438-4.jpg"
thumb="http://www.thetvdb.com/banners/_cache//banners/posters/303438-4.jpg"/>
</images>
</item>
</metadata>
}}}
As you can see above, the initial lookup based on the recording Title
works fine. From it, we pull out the inetref number 303438 which is used
in the next invocation.
{{{
terra[67] /usr/share/mythtv/metadata/Television/ttvdb.py -l en -a US -C
303438
! Error: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2674, in
<module>
sys.exit(main())
File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2462, in
main
t._getShowData(series_season_ep[0], opts.language)
File "/usr/local/lib/python2.7/dist-packages/MythTV/ttvdb/tvdb_api.py",
line 1070, in _getShowData
self._parseBanners(sid)
File "/usr/local/lib/python2.7/dist-packages/MythTV/ttvdb/tvdb_api.py",
line 961, in _parseBanners
for banner_info in banners_info:
TypeError: 'NoneType' object is not iterable
Exit 1
}}}
Here, we see that line 961 in tvdb_api.py is the location of the failure.
{{{
959 for cur_banner in bannersEt.keys():
960 banners_info =
self._getetsrc(self.config['url_seriesBannerInfo'] % (sid, cur_banner))
961 for banner_info in banners_info:
}}}
I added a print statement to see what the value of cur_banner is when
these failures happen. For each of the Titles listed above, the failure
happened when cur_banner = 'seasonwide'.
I suspect that there has been some change implemented in the database from
which the metadata is retrieved to eliminate 'seasonwide' banner
information for some TV shows.
The fix is to add one line to verify that banners_info is not None, and to
indent the block which follows.
{{{
959 for cur_banner in bannersEt.keys():
960 banners_info =
self._getetsrc(self.config['url_seriesBannerInfo'] % (sid, cur_banner))
961 if banners_info is not None:
962 for banner_info in banners_info:
}}}
I tested this, and found that metadata retrieval for all these recordings
work, once again.
I'm running MythTv version **v31-Pre-487-gf3c90896bf**.
Earlier releases may be impacted by the same issue.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13510>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list