[mythtv-users] Remotely monitor Backend is running

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Oct 12 03:25:44 UTC 2021


On Mon, 11 Oct 2021 11:58:22 -0500, you wrote:

>
>Hi Stephen!
>
>> I have put the Python 2 and Python 3 compatible version on my web
>> server:
>>
>> http://www.jsw.gen.nz/mythtv/test-mythbackend.py
>>
>> This is the Python 3 version, since most people will be using that
>> now.  Change the top line to use it with Python 2.
>
>Minor problems to report. Changed the top line to *#!/usr/bin/env python2*
>
>I added a comment:
>
>*# Top line is "#!/usr/bin/env python3" or "#!/usr/bin/env python2"*
>*# depending on which version of MythTV: v30 and less uses Python 2*
>
>...I’m thinking should ‘confuse’ anything but just to let you know.

If you look at the title comment just a few lines down, I have already
put that information in it.

>
>Ran and got this:
>
>*barry at NZXT:~$ python '/home/barry/MythTV Backend Scripts/Test-BE.py'
>*Traceback (most recent call last):
>*File "/home/barry/MythTV Backend Scripts/Test-BE.py", line 23, in <module>
>*from enum import IntEnum
>*ImportError: No module named enum
>*
>*barry at NZXT:~$ python
>**
>*Python 2.7.17 (default, Feb 27 2021, 15:10:58)
>*
>*[GCC 7.5.0] on linux2
>*
>*Type "help", "copyright", "credits" or "license" for more information.*
>*
>*>>> exit()*
>
>Noted in the script there is a statement to “print 
 install the 
>...enum34 package” however this didn’t show up in Terminal. Will do in a 
>little while.

Yes, I forgot to move the original import line down into the
conditional, so it was still there ahead of the intended code.  Fixed
in v1.2.

I have also added code to check for services_api and prompt you to
install that if it is not present.  That is a bit problematic.  It is
in the libmyth-python package, but depending on the system you are
running test-mythbackend.py from, the correct version of
libmyth-python to match the v30 on your backend box may or may not be
available.  And installing libmyth-python will drag in a number of
other packages, including bits of MythTV.  I am not sure just how much
would need to be installed to satisfy the dependencies of
libmyth-python, but it could extend up to a complete MythTV backend
system with database, and that is not really what you would want on
that PC.  It might be necessary to see if you could just copy bits of
the correct libmyth-python package across from your backend box,
rather than install the full libmyth-python package.  If that is even
possible.

So I think I need to create a virtual PC running a similar setup to
the PC you want to run this on and try it out and see what happens. So
what is that PC running?  And your current backend box is running
MythTV v30, but what version of Ubuntu is it running?


More information about the mythtv-users mailing list