[mythtv-users] Upgraded to 29, mythmetadata lookup failing...

Bill Meek keemllib at gmail.com
Sun Sep 17 14:23:21 UTC 2017


On 09/16/2017 10:11 AM, Marlon Buchanan wrote:
>>
>> What is the output of the following commands (if your distro has ttvdb.py
>> and tmdb3.py in a different location you may need to search for them and
>> correct the path as appropriate). Make sure to run as the same user in same
>> environment as is running the backend.
>>
>> /usr/local/share/mythtv/metadata/Television/ttvdb.py -v
>> /usr/local/share/mythtv/metadata/Movie/tmdb3.py -v
>> /usr/local/share/mythtv/metadata/Movie/tmdb3.py -t
>>
>> I was getting the same error. In my case on a clean install (but heavily
>> customised inside a docker container) I found that I was missing group
>> execute permissions on ttvdb.py and tmdb3.py. I also had no ~/.mythtv/cache
>> directory and ttvdb.py failed until I manually created the cache directory
>> with appropriate permissions. I also used pip to install requests_cache
>> "pip
>> install requests-cache".
>>
>> $/usr/local/share/mythtv/metadata/Television/ttvdb.py -v
>> Traceback (most recent call last):
>>    File "/usr/local/share/mythtv/metadata/Television/ttvdb.py", line 1074,
>> in
>> <module>
>>      os.mkdir(cache_dir)
>> OSError: [Errno 2] No such file or directory:
>> '/home/mythtv/.mythtv/cache/tvdb_api/'
>>
>> I have a .mythtv/cache file with proper permissions. All apropriate python
> modules are installed. ttvdb.py, tmdb3.py and mythmetadatalookup all work
> fine commandline using the same user as runs them as mythbackend. The only
> place that fails to run them is withing mythtbackend mythmetadatalookup
> jobs. I now run mythmetadatalookup in a cron job and that works fine, but
> is not ideal.
> 
>   08:05:06 marlon:~$ sudo -u mythtv
> /usr/share/mythtv/metadata/Movie/tmdb3.py -v
> <?xml version='1.0' encoding='UTF-8'?>
> <grabber>
>    <name>TheMovieDB.org V3</name>
>    <author>Raymond Wagner</author>
>    <thumbnail>tmdb.png</thumbnail>
>    <command>tmdb3.py</command>
>    <type>movie</type>
>    <description>Search and metadata downloads for themoviedb.org
> </description>
>    <version>0.3.7</version>
>    <accepts>tmdb.py</accepts>
>    <accepts>tmdb.pl</accepts>
> </grabber>
> 08:05:10 marlon:~$ sudo -u mythtv /usr/share/mythtv/metadata/Movie/tmdb3.py
> -t
> Everything appears in order.
> 08:05:13 marlon:~$ sudo -u mythtv
> /usr/share/mythtv/metadata/Television/ttvdb.py -v
> <grabber>
>    <name>TheTVDB.com</name>
>    <author>R.D.Vaughan</author>
>    <thumbnail>ttvdb.png</thumbnail>
>    <command>ttvdb.py</command>
>    <type>television</type>
>    <description>Search and metadata downloads for thetvdb.com</description>
>    <version>2.0.0</version>
> </grabber>

I'm stumped. I'd try running the tests in two steps,
like this (to simulate the mythtv environment better):

     sudo --set-home --login --user=mythtv
     /usr/local/share/mythtv/metadata/Television/ttvdb.py -v

Thinking that user mythtv has a copy of some module
in it's directory (done with pip install run without
sudo for example.)

OK, three steps: echo $PYTHONPATH while you're user mythtv.

-- 
Bill


More information about the mythtv-users mailing list