[mythtvnz] No EPG - need temp solution
Stephen Worthington
stephen_agent at jsw.gen.nz
Sat Apr 16 04:59:42 BST 2022
On Sat, 16 Apr 2022 11:44:54 +1200, you wrote:
>I think that after following Stephen's instructions I am nearly there
>but I get the following when I run
>
>*journalctl -eu epg*
>
>Apr 16 11:27:27 FishMyth systemd[1]: Started Get MHEG5 EPG for MythTV.
>Apr 16 11:27:27 FishMyth bash[4232]: Try 1, running mhegepgsnoop.py now
>Apr 16 11:27:27 FishMyth bash[4234]: Options selected =
>Namespace(UTC=False, both=True, clean_titles=False,
>demux_device='/dev/dvb/adapter0/>
>Apr 16 11:27:27 FishMyth bash[4234]: Getting channel info from MythTV
>database using Python bindings
>Apr 16 11:27:30 FishMyth bash[4234]: Cannot find home directory to write to
>Apr 16 11:27:30 FishMyth bash[4234]: Error accessing mythconverg
>database using Python bindings. Exiting.
>Apr 16 11:27:30 FishMyth bash[4258]: rm: cannot remove '/tmp/xmltv.xml':
>No such file or directory
>Apr 16 11:27:30 FishMyth bash[4232]: Warning: mhegepgsnoop failed
>(retval=1), retrying after sleep 5m
>
>I suspect that I might need to edit a few files.
The problem is that mhegepgsnoop is not able to access the database -
it is not finding the config.xml file. The code for doing that is in
the MythTV Python bindings, rather than mhegepgsnoop.py. It should be
looking in /etc/mythtv for that, but it seems that it is not - it is
looking for $(HOME)/.mythtv/config.xml, even though it is being run as
root. And it just happens that on the systems I was testing it on,
/root/.mythtv/config.xml exists, so I did not notice the problem.
Since the problem is in the bindings, I can not fix it directly. Maybe
I could subclass the Python bindings and override the location when it
is being run from root, but that is dependent on the internals of the
Python bindings, so is probably not the best way to do it.
Fortunately, an easy workaround fixes it: create
/root/.mythtv/config.xml as a link to /etc/mythtv/config.xml:
sudo su
cd /root
mkdir .mythtv
rm config.xml
cd .mythtv
ln -s /etc/mythtv/config.xml
exit
If there are any error messages on the mkdir or rm commands above,
ignore them - it probably just means that at some point you have run
mythtv-setup from root instead of the usual mythtv user and
/root/.mythtv exists already.
I have also noticed a stupid typo in do_mhegegpgsnoop3.sh - I missed
out the | between the "cat" and "xmltv-proc-nz" commands. This is not
fatal, but it does mean that xmltv-proc-nz is not being run on the
data and the EPG will not have all the fixes it does, including
getting rid of the "New" and "All new" prefixes. So please
re-download the fixed do_mhegepgsnoop3.sh, mv and edit it again as per
the original instructions.
More information about the mythtvnz
mailing list