[mythtv-users] XMLTV grabber returned error code 1

Bill Meek keemllib at gmail.com
Wed May 11 18:45:19 UTC 2022


On 5/11/22 12:59, DryHeat122 wrote:
> 
> On Wed, May 11, 2022 at 10:28 AM Gary Buhrmaster <gary.buhrmaster at gmail.com <mailto:gary.buhrmaster at gmail.com>> wrote:
> 
>     On Wed, May 11, 2022 at 2:53 AM DryHeat122 <dryheat122 at gmail.com <mailto:dryheat122 at gmail.com>> wrote:
>      >
>      > I am getting that error when I run mythfilldatabase. It is followed by:
>      >
>      >      Malformed XML file, missing </tv> element, at line 1, Premature end of document.
>      >
>      > What XML file is it talking about? The one returned by Schedules Direct? How do I troubleshoot this?
> 
>     The one that mythfilldatabase is trying to load,
>     which is (typically) generated by your grabber,
>     unless an error occurs.
> 
>     There are many possible reasons for a grabber
>     to fail (the most common are a filesystem (/tmp)
>     being out of space, and that one is running it
>     by a userid (i.e. the backend user) who does not
>     have permissions on the file(s) that were created
>     by the userid one used (i.e. not the same userid
>     as the backend userid) to configure the grabber
>     initially).
> 
>     To obtain additional information from the grabber
>     itself, one can add in the flags "--verbose general,xmltv"
>     to the invocation of mythfilldatabase and mythtv
>     will log the grabbers output (if any) that may
>     provide additional guidance.
> 
> 
> Thanks Stephen and Gary for the replies. I think I have figured out the problem. I have grabber setups under both /home/mythtv and /home/steve. 
> Don't ask me how I managed that.
> 
> After running Gary's channel fixer script, MythTV is using the xmltv under /home/steve. When I ran mythfilldatabase as user steve, it grabbed 
> shows and restored my program guide and upcoming recordings. However, when it MythTV runs mythfilldatabase nightly (I think it is) it does so as 
> user mythtv, and encounters these errors.  I had a look at the grabber code and can't find anywhere it actually creates an .xml file, nor a line 
> where the reported error message is generated.
> 
> So it seems the options are to (1) tell myth to run mythfilldatabase under user steve, but I don't know if that can be done or if so how, (2) 
> re-run Gary's script pointing at the /home/mythtv (which I'm reluctant to do for fear of breaking things again), or (3) do the expedient thing 
> and cheat by writing a cron job to run mythfilldatabase under steve and  just let the job under myth continue to fail.

The intent is that both the backend's run of mythfilldatabase and a user's run are both
done as user mythtv. The Wiki encourages running the setup commands as user mythtv.

This ASCII art works, for me:

   https://forum.mythtv.org/viewtopic.php?f=36&t=3480&start=15#p19508

Note, I'm a tv_grab_zz_sdjson_sqlite user.

My mfdbrun command is my alias and this is in my .bashrc:

   alias mfdbrun='sudo --login --user=mythtv mythfilldatabase --verbose=xmltv'

The only issue I've heard of is that some users don't want to allow user mythtv
to login.

I understand redoing a working setup may appear risky. I'd just COPY the files under your
user to the same places in ~mythtv/.mythtv. Make all related files user:group mythtv
and the <source>.xmltv file(s) points to mythtv's copy of the SQLite DB. Test that
the 'normal' MFDB run by the backend works as does the mfdbrun above (or whatever
you'd like to name it.) I recall that the .xmltv directory must also be mythtv:mythtv

When both tests pass, delete the newly created files in your user's .mythtv directory
(or hide them is a secret place and delete them later.)

-- 
Bill


More information about the mythtv-users mailing list