Tvheadend xmltv EPG problem after october upgrade

Hello, I’m running OSMC on a Pi3 B+

Since I upgraded with the latest october version, my EPG will not update anymore in tvheadend.

I use the zap2epg addon that connects to zap2it.com

I get the following error:
2020-10-23 19:55:10.000 xmltv: /usr/bin/tv_grab_zap2epg: grab /usr/bin/tv_grab_zap2epg
2020-10-23 19:55:10.005 spawn: Executing “/usr/bin/tv_grab_zap2epg”
2020-10-23 19:55:10.250 xmltv: /usr/bin/tv_grab_zap2epg: htsmsg_xml_deserialize error Unknown syntatic element:
2020-10-23 19:55:10.250 xmltv: /usr/bin/tv_grab_zap2epg: grab returned no data

The /usr/bin/tv_grab_zap2epg script calls a python script (zap2epg.py)
It then creates an xmltv.xml file without problem. The problem lies when tvheadend tries to parse the xmltv.xml file.

I always do a system backup before I upgrade. When I restored my backup and booted to the old osmc version, my EPG grabber works fine.

I tried to generate the xmltv.xml file on the old version, import it in the october upgrade version and load it in tvheadend. This does not work either. So, this is really something that’s broken on the tvheadend xmltv side of the october upgrade.

Anyone experienced something similar?

Hi

I haven’t updated the major TVHeadend version for Buster, so I’d be surprised if there are changes here that cause this.

I’d recommend checking with the developer of this EPG service to see if they’ve made any changes that could be responsible for this.

Sam

I got exactly the same issue since update. No change to the said add-on. Will try to investigate when I got the time…!

Looking at the zap2epg.log file during the grab, I do notice a few errors like these.

2020/10/26 21:53:29 Could not parse data for: 1604174400 - deleting file - 'tmsID’Traceback (most recent call last):
File “/home/osmc/.kodi/addons/script.module.zap2epg/zap2epg.py”, line 569, in parseXdetails
if EPid.lower() == airing[‘tmsID’].lower():
KeyError: ‘tmsID’

But the jobs seems to terminate fine I get this at the end:

2020/10/26 21:53:32 Creating xmltv.xml file…
2020/10/26 21:53:32 Writing Stations to xmltv.xml file…
2020/10/26 21:53:32 Writing Episodes to xmltv.xml file…
2020/10/26 21:53:33 Checking for old show cache files…
2020/10/26 21:53:33 zap2epg completed in 14.76 seconds.
2020/10/26 21:53:33 5 Stations and 1331 Episodes written to xmltv.xml file.

I’ll check some more tomorrow, maybe the xmltv.xml file have changed place

Actually, the xmltv.xml file can be created in any directory because the script called by tvheadend simply dumps the output of the file via a “cat” command.

It’s when it’s imported that it fails. I’ll have to reapply the upgrade and enable debug mode for xmltv in tvheadend and check what happens.

You can do it too if you have time :smiley:

Thats where I am today, trying to figure out where to active it and find the said log. Tried a few things and doesn’t seems to work, kodi.log aint showing nothing either

You have to go in the tvheadend web interface.

In the “Configuration” tab, there is a “Debugging” subfolder

You can choose a log file output

In “debug subsystem” you can put “xmltv”

Thanks, it worked, but the log file generated is almost the same as the one at the bottom of the webpage.

2020-10-27 14:30:57.333 [   INFO]:xmltv: /usr/bin/tv_grab_zap2epg: grab /usr/bin/tv_grab_zap2epg
2020-10-27 14:30:57.336 [   INFO]:spawn: Executing "/usr/bin/tv_grab_zap2epg"
2020-10-27 14:31:12.677 [  ERROR]:xmltv: /usr/bin/tv_grab_zap2epg: htsmsg_xml_deserialize error Unknown syntatic element: <!DOCTYPE tv
2020-10-27 14:31:12.677 [WARNING]:xmltv: /usr/bin/tv_grab_zap2epg: grab returned no data

Hmm you should have something similar to this:
https://tvheadend.org/projects/tvheadend/wiki/Traces

There should be a [DEBUG] tag. Maybe you can also try to enable the traces.

Your error is a bit different than the one I got though. You have what appears to be the beginning of the xml file after the deserialize error. Mine is just blank.

I haven’t had the time to reapply the update yet.

Yeah, thats what i did, the form look a bit different but got it working.

Since I cannot rollback cause i didnt do a backup, before you do the update, backup the xmltv.xml located at /home/osmc/.kodi/userdata/addon_data/script.module.zap2epg with the one generated after the update to compare with difference. It’s realy weird that’s its working prior the update since sam said there was no significant update to TVHeadend

There have been a new version to the addon wich correct the exact issue we were having. Applied and I got EPG working back again !

Here is the link to the thread TVHeadend and zap2it/zap2xml