[mythtv-users] tmdb issues today?

Hika van den Hoven hikavdh at gmail.com
Mon Nov 9 21:17:43 UTC 2015


Hoi Ian,

Monday, November 9, 2015, 9:51:04 PM, you wrote:

> On Mon, Nov 9, 2015 at 3:43 PM, Hika van den Hoven <hikavdh at gmail.com>
> wrote:

>> Hoi Ian,
>>
>> Monday, November 9, 2015, 9:39:17 PM, you wrote:
>>
>> > On Mon, Nov 9, 2015 at 3:26 PM, Hika van den Hoven <hikavdh at gmail.com>
>> > wrote:
>>
>> >> Hoi Hika,
>> >>
>> >> Monday, November 9, 2015, 9:03:07 PM, you wrote:
>> >>
>> >> > Hoi Ian,
>> >>
>> >> > Monday, November 9, 2015, 8:38:39 PM, you wrote:
>> >>
>> >> >> On Nov 9, 2015 2:26 PM, "Ian Evans" <dheianevans at gmail.com> wrote:
>> >> >>>
>> >> >>>
>> >> >>> On Nov 9, 2015 1:53 PM, "Hika van den Hoven" <hikavdh at gmail.com>
>> >> wrote:
>> >> >>> >
>> >> >>> > Hoi Hika,
>> >> >>> >
>> >> >>> > Monday, November 9, 2015, 7:36:23 PM, you wrote:
>> >> >>> >
>> >> >>> > > Hoi Paul,
>> >> >>> >
>> >> >>> > > Monday, November 9, 2015, 7:17:45 PM, you wrote:
>> >> >>> >
>> >> >>> > >> On Tue, Nov 10, 2015 at 5:43 AM Ian Evans <
>> dheianevans at gmail.com>
>> >> >> wrote:
>> >> >>> >
>> >> >>> > >>> On Sun, Nov 8, 2015 at 4:49 PM, Ian Evans <
>> dheianevans at gmail.com
>> >> >
>> >> >> wrote:
>> >> >>> > >>>
>> >> >>> > >>>> Couple of weird things with tmdb3.py today.
>> >> >>> > >>>>
>> >> >>> > >>>> One movie gave me choices to select. Selected the correct
>> one,
>> >> but
>> >> >>> > >>>> nothing was downloaded or updated, instead giving me a no
>> >> results
>> >> >> found
>> >> >>> > >>>> error, despite the fact that it just showed me the box cover
>> in
>> >> >> the choices
>> >> >>> > >>>> and I chose the correct one.
>> >> >>> > >>>>
>> >> >>> > >>>> Second movie, it's not offered in the choices despite being
>> in
>> >> the
>> >> >> tmdb
>> >> >>> > >>>> database.
>> >> >>> > >>>>
>> >> >>> > >>>> If I look manually in a browser and get the tmdb number and
>> run
>> >> >>> > >>>> /usr/share/mythtv/metadata/Movie/tmdb3.py -D 133557 I see the
>> >> >> available
>> >> >>> > >>>> info.
>> >> >>> > >>>>
>> >> >>> > >>>> So I put tmdb3.py_133557 into the video details and still was
>> >> not
>> >> >> able to
>> >> >>> > >>>> retrieve anything.
>> >> >>> > >>>>
>> >> >>> > >>>> Is there just general wonkiness with tmdb today?
>> >> >>> > >>>>
>> >> >>> > >>>>
>> >> >>> > >>>>
>> >> >>> > >>> Okay, the weirdness with tmdb3 continues today.
>> >> >>> > >>>
>> >> >>> > >>> Nov  9 11:30:26 buster mythfrontend.real: mythfrontend[4887]:
>> I
>> >> >>> > >>> MetadataDownload metadatagrabber.cpp:455 (RunGrabber) Running
>> >> >> Grabber:
>> >> >>> > >>> /usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a CA -D 14637
>> >> >>> > >>> Nov  9 11:30:27 buster mythfrontend.real: mythfrontend[4887]:
>> I
>> >> >>> > >>> MetadataDownload metadatagrabber.cpp:455 (RunGrabber) Running
>> >> >> Grabber:
>> >> >>> > >>> /usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a CA -C 14637
>> >> >>> > >>> Nov  9 11:30:27 buster mythfrontend.real: mythfrontend[4887]:
>> I
>> >> >>> > >>> MetadataDownload metadatadownload.cpp:187 (run) Metadata
>> Lookup
>> >> >> Failed: No
>> >> >>> > >>> Results Nothing But the Truth 0 0
>> >> >>> > >>> Nov  9 11:30:27 buster mythfrontend.real: mythfrontend[4887]:
>> I
>> >> >>> > >>> CoreContext videodlg.cpp:3347 (customEvent) No results found
>> for
>> >> >> Nothing
>> >> >>> > >>> But the Truth 0 0
>> >> >>> > >>>
>> >> >>> > >>> If I ssh in and manually run:
>> >> >>> > >>>
>> >> >>> > >>> /usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a CA -D 14637
>> >> >>> > >>>
>> >> >>> > >>> I get:
>> >> >>> > >>>
>> >> >>> > >>> Traceback (most recent call last):
>> >> >>> > >>>   File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 312,
>> in
>> >> >> <module>
>> >> >>> > >>>     main()
>> >> >>> > >>>   File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 306,
>> in
>> >> >> main
>> >> >>> > >>>     buildSingle(args[0], opts)
>> >> >>> > >>>   File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 70,
>> in
>> >> >> buildSingle
>> >> >>> > >>>     index = zip(*releases)[0].index(opts.country)
>> >> >>> > >>> ValueError: tuple.index(x): x not in tuple
>> >> >>> > >>>
>> >> >>> > >>> If I manually run:/usr/share/mythtv/metadata/Movie/tmdb3.py
>> -l en
>> >> >> -a CA -C
>> >> >>> > >>> 14637
>> >> >>> > >>>
>> >> >>> > >>> I get:
>> >> >>> > >>>
>> >> >>> > >>> <?xml version='1.0' encoding='UTF-8'?>
>> >> >>> > >>> <metadata/>
>> >> >>> > >>>
>> >> >>> > >>> Here's another odd thing: If I strip off the '-l en -a CA' I
>> get
>> >> >> different
>> >> >>> > >>> results.as in the bare -D 14637 command gives me an XML
>> response
>> >> >> full of
>> >> >>> > >>> movie information.
>> >> >>> > >>>
>> >> >>> > >>> This has all worked beautifully before. Did a recent change
>> break
>> >> >> things
>> >> >>> > >>> or did tmdb change something on their side?
>> >> >>> > >>>
>> >> >>> > >>> Hope the additional info helps.
>> >> >>> > >>>
>> >> >>> > >>> I had exactly the same issue a week or so ago. I'm in New
>> Zealand
>> >> >> BTW and
>> >> >>> > >> so I has "-l en -a NZ". I modified the script to force "US"
>> and it
>> >> >> works
>> >> >>> > >> again, so I think it's some kind of location based issue.
>> >> >>> >
>> >> >>> > >> Cheers,
>> >> >>> > >> Paul
>> >> >>> >
>> >> >>> > > No both with CA, NZ or NL it works here. It makes me think of a
>> >> small
>> >> >>> > > bug I fixed in youtube a few month ago, where the presence of
>> some
>> >> >>> > > default was wrongly assumed. I have to look if I see anything
>> >> similar.
>> >> >>> >
>> >> >>> > Anyhow I checked in my version of tmdb3.py (version 0.3.7) and
>> it's
>> >> >>> > not your version. line 70 in your trace is on line 64, so there
>> are
>> >> >>> > some 6 extra lines in the top and his line 306 is at 294, so some
>> >> >>> > other extra 6 lines? If you can send me your version I can have a
>> >> >>> > look.
>> >> >>> >
>> >> >>> > Tot mails,
>> >> >>> >   Hika                            mailto:hikavdh at gmail.com
>> >> >>> >
>> >> >>>
>> >> >>> My version is 0.3.7. Can't school in right now as the coffee shop is
>> >> >> blocking my dynamic dns address. Will try to get around it.
>> >>
>> >> >> That should read "ssh" in. Sometimes I don't catch the phone keyboard
>> >> auto
>> >> >> correct.
>> >>
>> >> > I emerge the latest version (okt 25) from Gentoo on my workstation and
>> >> > I now get the same error. But on a quick glance all that has been
>> >> > added is some error catching. So my first thought was that it was
>> >> > deeper down in the underlying libraries, but running my old script on
>> >> > the updated libraries does not give the error. I have to look deeper
>> >> > at the changes.
>> >>
>> >> > Tot mails,
>> >> >   Hika                            mailto:hikavdh at gmail.com
>> >>
>> >> OK, I do not jet fully understand, but it looks like that the added
>> >> IndexError handler prevents the ValueError handler from being ignored.
>> >> So either removing the IndexError or reversing the order will work.
>> >> For now, if you in line 72 change:
>> >>
>> >>         except IndexError, ValueError:
>> >>
>> >> to:
>> >>
>> >>         except ValueError, IndexError:
>> >>
>> >> Making that change worked. Should a bug report be filed?
>>
>> I will do, but I first have to study it some more to come with the
>> right solution.
>>
>> Well, thanks for your help. I hadn't added anything to my library in a
>> while so I wonder how long it's been like that.
>>

My Gentoo Mythtv version from June 27th didn't have the change, the
latest from October 25th did. So somewhere in between.

I further analyzed, and all this snippet does is to filter out a
country specific releasedate. And while the old code handled a missing
one OK, the new one breaks it's neck. So make sure all the Canadian
releasedates are in the movie db and you won't notice it. ;-)

But anyhow it checks on the date being absent by catching the error.
Only now the error handler was not specific enough anymore. I myself
would add a specific test on the presence, but those are two styles in
Python programming. The other side would call this abuse of
errorhandling.


Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list