Mailing List Archive

tvmaze -t causing failure in mythmetadatalookup
Hello All,

I'm running Mythtv v31 from debian buster backports (deb-multimedia).
I recently updated the metadata settings to use tvmaze for television
and tmdb for movies.
Previously, i had no issues with tvdb and tmdb.
Now i seem to be having troubles with metadatalookup from "recordings".
The metadatalookup job always fails with exit status 128.
I tried to use mythmetalookup with starttime and chanid on a recording
with loglevel debug and -v all and the log shows that it runs both
tmdb3.py and tvmaze.py with "-t" options (selftest) first.
In my case, tvmaze.py -t fails as it says "Failed to import PyTVmaze
library. This should have been included with the python MythTV
bindings." Then the job exits.
I checked my system and i do in fact have the MythTV/tvmaze/tvmaze_api
files present, but for some reason it fails the import?
If i manually comment out the code in the main tvmaze.py python script
so it doesn't run the selftest, then the overall mythmetadatalookup
scripts seem to work fine.
Obviously, this is not how it's meant to be, can anyone help to debug
this issue?

thanks,
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: tvmaze -t causing failure in mythmetadatalookup [ In reply to ]
Hoi Simon,

Tuesday, April 13, 2021, 1:18:41 PM, you wrote:

> Hello All,

> I'm running Mythtv v31 from debian buster backports (deb-multimedia).
> I recently updated the metadata settings to use tvmaze for television
> and tmdb for movies.
> Previously, i had no issues with tvdb and tmdb.
> Now i seem to be having troubles with metadatalookup from "recordings".
> The metadatalookup job always fails with exit status 128.
> I tried to use mythmetalookup with starttime and chanid on a recording
> with loglevel debug and -v all and the log shows that it runs both
> tmdb3.py and tvmaze.py with "-t" options (selftest) first.
> In my case, tvmaze.py -t fails as it says "Failed to import PyTVmaze
> library. This should have been included with the python MythTV
> bindings." Then the job exits.
> I checked my system and i do in fact have the MythTV/tvmaze/tvmaze_api
> files present, but for some reason it fails the import?
> If i manually comment out the code in the main tvmaze.py python script
> so it doesn't run the selftest, then the overall mythmetadatalookup
> scripts seem to work fine.
> Obviously, this is not how it's meant to be, can anyone help to debug
> this issue?

> thanks,

Maybe a python2/3 issue?




Tot mails,
Hika mailto:hikavdh@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

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: tvmaze -t causing failure in mythmetadatalookup [ In reply to ]
On Tue, Apr 13, 2021 at 5:28 PM Hika van den Hoven <hikavdh@gmail.com>
wrote:

>
> > In my case, tvmaze.py -t fails as it says "Failed to import PyTVmaze
> > library. This should have been included with the python MythTV
> > bindings." Then the job exits.
>
>
This can be related to the bug #347 at
https://github.com/MythTV/mythtv/issues/347

Open a terminal, and enter the following commands:

> python3
> Python 3.8.5 (default, Jan 27 2021, 15:41:15)
> [GCC 9.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import lxml
> >>> import requests
> >>> import requests_cache
> >>> import MythTV
> >>> from MythTV.tvmaze import tvmaze_api
> >>>
>

This should give you a python traceback if one of these modules can't be
found.
Try to install the missing module

I suspect, that the package 'python3-dateutil' is missing, according to
issue #347.
Re: tvmaze -t causing failure in mythmetadatalookup [ In reply to ]
On Wed, 14 Apr 2021 at 04:28, Roland Ernst <rcrernst@gmail.com> wrote:
>
>
>
> On Tue, Apr 13, 2021 at 5:28 PM Hika van den Hoven <hikavdh@gmail.com> wrote:
>>
>>
>> > In my case, tvmaze.py -t fails as it says "Failed to import PyTVmaze
>> > library. This should have been included with the python MythTV
>> > bindings." Then the job exits.
>>
>
> This can be related to the bug #347 at
> https://github.com/MythTV/mythtv/issues/347
>
> Open a terminal, and enter the following commands:
>>
>> python3
>> Python 3.8.5 (default, Jan 27 2021, 15:41:15)
>> [GCC 9.3.0] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> import lxml
>> >>> import requests
>> >>> import requests_cache
>> >>> import MythTV
>> >>> from MythTV.tvmaze import tvmaze_api
>> >>>
>
>
> This should give you a python traceback if one of these modules can't be found.
> Try to install the missing module
>
> I suspect, that the package 'python3-dateutil' is missing, according to issue #347.
>
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


Hello,

yes, thanks, the dateutil module was missing:

xxxxx@xxxxxxxxxxx:~$ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>> import requests
>>> import requests_cache
>>> import MythTV
>>> from MythTV.tvmaze import tvmaze_api
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/MythTV/tvmaze/tvmaze_api.py",
line 38, in <module>
from dateutil import parser
ModuleNotFoundError: No module named 'dateutil'

As i don't have any problem with adding these modules for both python2
and python3, i simply installed both the python-dateutil and
python3-dateutil packages. Even when the bugfix for #347 comes
through on my next mythtv update via deb-multimedia, the change will
be seamless.

I then removed my comments in the original script to allow the "-t"
option to actually function and it's all ok now.

thanks!

Simon
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org