[mythtv-users] Important: Changes to Metadata lookup in March 2021

John Finlay finlay at moeraki.com
Wed Feb 24 21:54:36 UTC 2021


On 2/24/2021 10:08 AM, Peter Bennett wrote:
>
> On 2/23/21 5:58 PM, Hika van den Hoven wrote:
>> Tuesday, February 23, 2021, 6:17:00 PM, you wrote:
>>
>>
>>
>>
>>> On 2/23/21 7:12 AM, Ian Evans wrote:
>>>         Is this change being ported back to some older versions? 
>>> Still on 29-fixes for now.
>>
>>
>>> You must be on an older version of Linux. I see that the v0.29
>>> ppa has not been built since 2019, so I don't know if it is still    
>>> built. It probably has python 2.
>>> The metadata lookup python modules are independent of the mythtv
>>> version, and should probably have been a separate package.
>>> It may be possible to drop the new modules into your installation
>>> and compile the python, and it should work, but I don't have an      
>>> easy way of testing it.
>>> Anybody interested in testing this?
>>> Peter
>> Hoi Peter,
>>
>> I might. I run Gentoo with both python 2 and 3 and know my python. I
>> still run 0.27.
>> Where can I find the package? Is it possible to fool these older
>> versions by renaming the new package to the old name or is the in-
>> and/or output different?
>>
>> 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
>>
> Hi Hika
>
> It should work if you copy the new scripts into your system. The new 
> scripts are supposed to be compatible with both python2 and python3. 
> They definitely work with python 3.
>
> Check your python path by running
> python3
> import sys
> sys.path
>
> Find the correct path for dist-packages, using the same one that is 
> used for your old version of mythtv.
>
> Copy the files from the latest MythTV github, on both backend and 
> frontend (using your correct dist-packages path):
>
> github  mythtv/bindings/python/tmdb3/tmdb3/* -> 
> /usr/local/lib/python3.8/dist-packages/MythTV/tmdb3/
>
> github  mythtv/bindings/python/tvmaze/* -> 
> /usr/local/lib/python3.8/dist-packages/MythTV/tvmaze/
>
> These use the /usr/share path:
>
> github mythtv/programs/scripts/metadata/Television/tmdb3tv.py -> 
> /usr/share/mythtv/metadata/Television/
>
> github mythtv/programs/scripts/metadata/Television/tvmaze.py -> 
> /usr/share/mythtv/metadata/Television/
>
> Compile the new stuff in /usr/local/lib/python3.8/dist-packages/MythTV 
> subdirectories to create the __pycache__ directory in each.
> python3 -m py_compile *.py
>
> Test it by running these
>
> Display help page
> /usr/share/mythtv/metadata/Television/tmdb3tv.py -h
>
> Display series data xml
> /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en -a US -M Monk
>
> Display episode data xml
> /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en -a US -N 1695 
> "Mr. Monk and the Psychic"
>
> Display episode data xml
> /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en -a US -N Monk 
> "Mr. Monk and the Psychic"
>
> Run the same tests for tvmaze.py
>
> Let me know if this works.
>
> Note: You need to install them on all frontends and backend.
>
> Peter

I'm running 0.29 on mythbuntu 16.04. All the mythtv python libs are in 
the python2.7 dist-packages so that's where I installed the tmdb3 and 
tvmaze files. It appears that tvmaze.py requires python 3 so I just 
tried testing tmdb3.py but it bombed trying to retrieve the episode data:

Traceback (most recent call last):
   File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line 159, in 
<module>
     sys.exit(main("television",'tmdb3tv.py'))
   File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line 133, in 
main
     xml = buildEpisode(args[0:2], opts)
   File "/usr/lib/python2.7/dist-packages/MythTV/tmdb3/lookup.py", line 
300, in buildEpisode
     if query.isnumeric():
AttributeError: 'str' object has no attribute 'isnumeric'

which I guess indicates a python2 vs python3 mismatch.

John


More information about the mythtv-users mailing list