[mythtv-users] MythFillDatabase running, but not updating anything...

Douglas Peale Douglas_Peale at Comcast.net
Fri Apr 21 17:34:15 UTC 2023


On 4/21/23 06:51, Hika van den Hoven wrote:
> Hoi Douglas,
>
> Friday, April 21, 2023, 1:23:27 AM, you wrote:
>
>> On 4/15/23 21:39, Douglas Peale wrote:
>>> On 4/15/23 14:34, Bill Meek wrote:
>>>> On Saturday 15 April 2023 03:30:10 PM (-05:00), Douglas Peale wrote:
>>>>
>>>>> On 4/15/23 13:09, Bill Meek wrote:
>>>>>> On Saturday 15 April 2023 02:02:49 PM (-05:00), Douglas Peale wrote:
>>>>>>
>>>>>> ...
>>>>>>
>>>>>>> Apr 15 11:50:33 BlackBox mythfilldatabase: mythfilldatabase[1937008]: E CoreContext filldata.cpp:370 (Run)
>>>> tv_grab_zz_sdjson
>>>>>> ...
>>>>>>
>>>>>> Is tv_grab_zz_sdjson installed?
>>>>>> It was not.
>>>>>> I tried running it, and it told me that I could install it by installing xmltv-util.
>>>>>> Is there a reason this is not automatically installed when mythTV is installed?
>>>> Good question, I'd say because XMLTV grabbers get selected by the user. I use the
>>>> SQLite version too. Others like the text one. And then there's all of the grabbers for other
>>>> countries.
>>>>
>>>>> I ran backend setup again so I could force a mythfilldatabase run.
>>>>>> It now reports that it failed, and Mythweb actually reports that it ran today but failed, so the results are at least
>>>> different now.
>>>>>> I still don't know what I need to do to fix it.
>>>>>> MythFillDatabase.log excerpt:
>>>> ...
>>>>
>>>>> Apr 15 13:22:37 BlackBox mythfilldatabase: mythfilldatabase[2096762]: E CoreContext filldata.cpp:224 (GrabData) XMLTV
>>>> grabber returned error code 1
>>>>> Apr 15 13:22:37 BlackBox mythfilldatabase: mythfilldatabase[2096762]: E CoreContext xmltvparser.cpp:841 (parseFile)
>>>> Malformed XML file, missing  element, at line 1, Premature end  of  document.
>>>> ...
>>>>
>>>>
>>>> I'd run it again but add: -v system,xmltv
>>>>
>>>>
>>>> You'll see the actual command like used by the grabber. Run that (also as user mythtv) for clues.
>>>>
>>> Success!... I think.
>> I was wrong!
>> It works if I run mythfill database by clicking the button when I
>> exit backend setup, but if I let it run normally from the
>> mythbackend, it does not work.
>> It also does not work  from the command line.
>> I think I just noticed the error, but I don't know how to fix it.
>> I run the --configure option with this command:
>> sudo -u mythtv tv_grab_zz_sdjson --configure --config-file $HOME/.mythtv/Noth.xmltv
>> but if I run:
>> sudo -u mythtv echo $HOME
>> /home/dpeale
>> it points to my directory rather than /home/mythtv
>> If I look at the error messages in the log:
>> 2023-04-20 16:09:04.824824 I  ----------------- Start of XMLTV output -----------------
>> 2023-04-20 16:09:04.826222 I  Managed child (PID: 622718) has
>> started! * command=nice tv_grab_zz_sdjson --config-file
>> '/home/mythtv/.mythtv/NorthWest ATSC3.xmltv' --output /tmp/mythuKX1On, timeout=0
>> 2023-04-20 16:09:05.107176 I  Managed child (PID: 622718) has
>> exited! command=nice tv_grab_zz_sdjson --config-file
>> '/home/mythtv/.mythtv/NorthWest ATSC3.xmltv' --output
>> /tmp/mythuKX1On, status=256, result=1
>> 2023-04-20 16:09:05.122968 I  You need to configure the grabber by running it with --configure
>> 2023-04-20 16:09:05.122970 I  ------------------ End of XMLTV output ------------------
>> 2023-04-20 16:09:05.123689 E  XMLTV grabber returned error code 1
>> It is trying to use /home/mythtv instead.
>> So using "sudo -u mythtv" isn't setting the $HOME directory correctly.
>> I could try copying the stuff in my directory into /home/mythtv,
>> but I suspect that would screw something up.
>> How do I run as mythtv with the mythtv environment?
>> Even running mythbackendsetup from the Adiministaton menu uses my environment.
>
> Use:
> sudo -H -u mythtv tv_grab_zz_sdjson --configure --config-file $HOME/.mythtv/Noth.xmltv
>
> -H or --set-home forces the setting of the correct homedirectory.
> See man sudo
>
>
>
> Tot mails,
>    Hika                            mailto:hikavdh at gmail.com
>
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>
> De lerende Mens
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Thank you for your replies

I spent a bit of time googling, and succeeded with this:

sudo runuser -l mythtv
tv_grab_zz_sdjson --configure --config-file $HOME/.mythtv/North.xmltv
tv_grab_zz_sdjson --configure --config-file $HOME/.mythtv/NorthWest.xmltv
tv_grab_zz_sdjson --configure --config-file $HOME/.mythtv/NorthWest\ ATSC3.xmltv
tv_grab_zz_sdjson --configure --config-file $HOME/.mythtv/South.xmltv
exit

This opens a shell as the user mythTV that lets me run the configure operation.

The only drawback is that the arrow keys don't work in this shell, so you can't use the history, or edit functions in this 
shell. A bit tedious using copy & paste, but it did finally work.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x7B9B5178E6AE112A.asc
Type: application/pgp-keys
Size: 2452 bytes
Desc: OpenPGP public key
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230421/61557989/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230421/61557989/attachment.sig>


More information about the mythtv-users mailing list