[mythtv-users] Metadata Lookup Errored in Backend Log - On Every Recording.

Bill Meek keemllib at gmail.com
Tue Oct 28 15:07:33 UTC 2014


On 10/28/2014 08:33 AM, Greg Grotsky wrote:
...
> Bill, I just tried it out and you're right! The PYTHONPATH variable is not
> set:
>
> $ cat working_easy.log
> ----------------------------------------------------
> PYTHONHOME = Is not set.
> PYTHONPATH = /mythtv/local64/lib/python2.7/site-packages/.
> PYTHONNOUSERSITE = Is not set.
> About to import: MythTV
> The import worked.
> About to import: MythTV.tmdb3
> The import worked.
> $ cat broken_easy.log
> ----------------------------------------------------
> PYTHONHOME = Is not set.
> PYTHONPATH = Is not set.
> PYTHONNOUSERSITE = Is not set.
> About to import: MythTV
> The MythTV import failed.
> About to import: MythTV.tmdb3
> The MythTV.tmdb3 import failed.
> $
>
> Do I need those other two variables set? It doesn't appear as though I do.
> I wonder why the start-stop-daemon using --chuid wouldn't apply this stuff.
> I'll have to do some research on environment variables when using it.

Agreed, about the other two variables.

The man page for start-stop-daemon doesn't say anything about environmental
variables. It wouldn't surprise me to learn that when using --chuid (some of)
the environment is reset for security reasons.

You could add a line like this to your startup script:

     export PYTHONPATH="/mythtv/local64/lib/python2.7/site-packages/"

Using Upstart here, so can't help much with init.d scripts. Consider
dropping the --chuid argument and replacing it with --user *after*
mythbackend. Like: mythbackend --user you <all the other args>. That's
what the Upstart .conf file does.

-- 
Bill


More information about the mythtv-users mailing list