tvheadend, ATSC and epg...


  • When I check the configuration I see that the EPG source list is completely blank and I will have to set each one again.


    Seems strange and more of a tvheadend issue than a zap2xml problem. Next time it comes up blank, check and see what the update time is on the xmltv.xml file. That way you can narrow down if there is an issue with the file being generated - or of there is an issue with tvheadend holding your configuration. It would also help to post your hardware setup.


    There has been an issue that I've read about with the epg in kodi going blank - but you mention that the epg in tvh is blank and that the epg source fields have gone blank as well. That I have not seen - but may be worth posting in the tvheadend forum.

  • Seems strange and more of a tvheadend issue than a zap2xml problem. Next time it comes up blank, check and see what the update time is on the xmltv.xml file. That way you can narrow down if there is an issue with the file being generated - or of there is an issue with tvheadend holding your configuration. It would also help to post your hardware setup.


    There has been an issue that I've read about with the epg in kodi going blank - but you mention that the epg in tvh is blank and that the epg source fields have gone blank as well. That I have not seen - but may be worth posting in the tvheadend forum.


    I agree that it seems that it seems to be a tvheadend issue. I first noticed it in Kodi when my guide came up blank. However, when I started looking deeper I saw that the tvheadend fields were blank.

  • So, I'm having an issue with zap2xml not updating the EPG data. On the first run it it will pull the data, but when it updates there seems to be some issue that I can't figure out.


    Here's the log.


    And the tvheadend log.

    Code
    [align=start]2016-10-04 11:45:57.000 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: grab /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml[/align]
    [align=start]2016-10-04 11:45:57.001 spawn: Executing "/storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml"[/align]
    [align=start]2016-10-04 11:46:12.259 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: grab took 15 seconds[/align]
    [align=start]2016-10-04 11:46:12.611 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: parse took 0 seconds[/align]
    [align=start]2016-10-04 11:46:12.611 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: channels tot= 57 new= 0 mod= 0[/align]
    [align=start]2016-10-04 11:46:12.611 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: brands tot= 0 new= 0 mod= 0[/align]
    [align=start]2016-10-04 11:46:12.611 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: seasons tot= 2005 new= 2005 mod= 2005[/align]
    [align=start]2016-10-04 11:46:12.611 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: episodes tot= 2098 new= 1695 mod= 1695[/align]
    [align=start]2016-10-04 11:46:12.611 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: broadcasts tot= 2098 new= 0 mod= 0[/align]
  • Got it - I think I found the error. If you can open the zap2xml.py file you can check the following:


    Open the zap2xml.py file (which is in the /.kodi/addons/script.module.zap2xml folder)...


    At line 1401 (or could be 1400 on your version) change the following:


    sortThing1 = p


    To the following:


    sortThing1= str(p)


    That should take care of it.


    The file is correct on my github: GitHub - edit4ever/script.module.zap2xml


    You can try downloading the zip and updating to see if that fixes it. If not - let me know. I'm running this version without any issues.


  • Thanks, but that's already what that line has set.

    Code
    if "credits" in programs[p]:
                fh.write("\t\t<credits>\n")
                global sortThing1, sortThing2
                sortThing1= str(p)
                sortThing2 = "credits"
                for g in sorted(programs[p]["credits"], cmp=sortThings):
                    fh.write("\t\t\t<actor>" + enc(g) + "</actor>\n")
                fh.write("\t\t</credits>\n")
            date = None
  • if "credits" in programs[p]:
    fh.write("\t\t<credits>\n")
    global sortThing1, sortThing2
    sortThing1= str(p)
    sortThing2 = "credits"


    Take out the red line - that shouldn't be there. Or just download the new zip and update the addon. :-)


    The other reason to update is I fixed the space after ampersand issue.


  • Ok, so I updated from git, but the "global" line is still in the script.

    Code
    if "credits" in programs[p]:
                fh.write("\t\t<credits>\n")
                global sortThing1, sortThing2
                sortThing1= str(p)
                sortThing2 = "credits"
                for g in sorted(programs[p]["credits"], cmp=sortThings):
                    fh.write("\t\t\t<actor>" + enc(g) + "</actor>\n")
                fh.write("\t\t</credits>\n")
            date = None


    I also looked at what it is on git and it's there also.


    I did an uninstall, then reinstalled it and now it's appears to be running as it should, but it did this when I first installed it too. I'll have to wait until it's finished and see if it will update the information and report back.

    Edited once, last by Tinwarble ().

  • Not a problem, I'll update again and see if the problem persists.


    It may be a little while, it's pulling 6 days of data and takes a while to do that. As soon as it finishes it's initial pull I'll update and see if it will update the EPG data without the error.

    Edited once, last by Tinwarble ().

  • Ok, so after several hours of frustration and getting nowhere, I decided to do a complete wipe of my Chromebox and start from scratch.


    I installed LE 7.0.2, then installed TVheadend 4.2 and set it up. Then I installed the latest zap2xml that you provided, changed the settings to pull 6 days of data, then rebooted my CB.


    Here's my settings.


    After the reboot, zap2xml began pulling the data, but when it got to the point of writing the xmltv.xml the log gave the same error I posted above for the zap2xml.log.


    Now when it runs all I get is this from the tvheadend log.

    Code
    [align=start]2016-10-05 17:00:31.000 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: grab /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml[/align]
    [align=start]2016-10-05 17:00:31.001 spawn: Executing "/storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml"[/align]
    [align=start]2016-10-05 17:00:42.924 spawn: cat: can't open '/storage/.kodi/userdata/addon_data/script.module.zap2xml/xmltv.xml': No such file or directory[/align]
    [align=start]2016-10-05 17:00:42.924 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: no output detected[/align]
    [align=start]2016-10-05 17:00:42.924 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: grab returned no data[/align]


    So either there's some setting I've missed or a dependency that required that I don't have, but for some reason it refuses to write the xmltv.xml file.


    EDIT: I changed the zap2xml settings to back to defaults and now it will write the xmltv.xml


    So I'm not sure what is causing the no write with the settings, but it appears that some setting is causing it to not be able to write the xmltv.xml.


    Also, on another note, I know you have this in the addon.xml for zap2xml <import addon="script.module.mechanize" version="0.2.6"/> , but when trying to install zap2xml it will still give a failure message due to "script.module.mechanize" dependency not being meet. I had to first install Aeon Nox skin before it would actually install mechanize.
    [hr]
    Now with the default zap2xml settings it's writing the xmltv.xml file, but now tvheadend is not able to pull the data. All I keep getting is :

    Code
    [align=start]2016-10-05 17:58:53.463 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: grab /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml[/align]
    [align=start]2016-10-05 17:58:53.465 spawn: Executing "/storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml"[/align]
    [align=start]2016-10-05 17:58:58.533 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: grab took 5 seconds[/align]
    [align=start]2016-10-05 17:58:58.550 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: parse took 0 seconds[/align]
    [align=start]2016-10-05 17:58:58.550 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: channels tot= 57 new= 0 mod= 0[/align]
    [align=start]2016-10-05 17:58:58.550 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: brands tot= 0 new= 0 mod= 0[/align]
    [align=start]2016-10-05 17:58:58.550 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: seasons tot= 0 new= 0 mod= 0[/align]
    [align=start]2016-10-05 17:58:58.550 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: episodes tot= 0 new= 0 mod= 0[/align]
    [align=start]2016-10-05 17:58:58.550 /storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml: broadcasts tot= 0 new= 0 mod= 0[/align]

    Edited once, last by Tinwarble ().

  • Quote


    So either there's some setting I've missed or a dependency that required that I don't have, but for some reason it refuses to write the xmltv.xml file.


    This is due to trying to grab too many channels/days - zap2it server times out. when first setting up - leave the default settings. Then you can add extra days and details a day or two at a time. until you get to the level you want (up to 14 days)...once you get the full amount of days to load, it will keep the epg updated as it will just need to grab a new day's data every day.

    Quote


    I had to first install Aeon Nox skin before it would actually install mechanize


    Not sure why you're seeing this unless there is an issue with the Kodi repo it is pulling mechanize from.

    Quote


    Now with the default zap2xml settings it's writing the xmltv.xml file, but now tvheadend is not able to pull the data.


    Have you setup the tvheadend channels to point to the proper zap2xml epg channel? They usually don't connect automatically, so you have to set the it up manually. It's on the CONFIGURATION>CHANNEL/EPG>CHANNELS tab. You select the epg source column for each channel and pick the correct zap2xml data for the channel you're setting up.


    Sorry about the delay in responding - I've been travelling and haven't checked in. Let me know if you're still having issues.

  • Latest release links (also updated on first post):


    Latest zap2xml addon release: Dropbox - script.module.zap2xml.zip
    zap2xml addon source: GitHub - edit4ever/script.module.zap2xml


    Latest schedules direct addon release: Dropbox - Link not found
    Schedules Direct addon source: GitHub - astrilchuk/sd2xmltv: A Schedules Direct to xmltv converter

  • edit4ever: if the code in your add-ons is stable you're welcome to submit them to our repo, or if you need some webspace to publish your own repo instead of using dropbox links (and then add your repo installer to our repo) to make updates easier for users; let myself or other staff know.


  • This is due to trying to grab too many channels/days - zap2it server times out. when first setting up - leave the default settings. Then you can add extra days and details a day or two at a time. until you get to the level you want (up to 14 days)...once you get the full amount of days to load, it will keep the epg updated as it will just need to grab a new day's data every day.


    I got that fixed, was able to actually set it for more days than default. What seemed to be causing it was the extra details. Even after it scrapped the info initially it would still cause issues if I set it to scrapped the extra details. Not big deal though, so not that worried about it.


    Quote


    Not sure why you're seeing this unless there is an issue with the Kodi repo it is pulling mechanize from.


    Yeah, I'm not sure what the problem is, but I had the same problem on all 3 systems I set it up on. A Chromebox, RPi and an older Amlogic box that I installed LE on.


    Quote


    Have you setup the tvheadend channels to point to the proper zap2xml epg channel? They usually don't connect automatically, so you have to set the it up manually. It's on the CONFIGURATION>CHANNEL/EPG>CHANNELS tab. You select the epg source column for each channel and pick the correct zap2xml data for the channel you're setting up.


    Sorry about the delay in responding - I've been travelling and haven't checked in. Let me know if you're still having issues.


    Yeah, that was actually my fault. After I set things back up, and because tvheadend will not add the muxes automatically, I have to manually add each mux. I think this maybe because I'm running a beta FW on my HDHomeRun. Anyway, what happened is that I didn't go back in and add the EPG source for each channel (I did this before on, but forgot to do it again after I started fresh). Rookie mistake. :(


    Not a problem about the delay, life is more important. ;) Usually I can figure these things out myself, but I was so close to having it working that I was just getting frustrated with it. I think that I was too close to it because once I stepped away from it for a while I was able to come back and figure out what I had done wrong.


    But I appreciate all your help and I appreciate the good work you've done providing this add-on.

  • Quote


    Yeah, that was actually my fault. After I set things back up, and because tvheadend will not add the muxes automatically, I have to manually add each mux.


    This is TVH issue for ATSC muxes was solved starting with the 2214 nightly release. There was an issue with the code for memory that messed it up. You can download one of CVH's nightlies index - powered by h5ai v0.29.0 (https://larsjung.de/h5ai/) for the RPi. For the other boxes, we need the LE repo to be updated (repo is still 1945) to a later release to get back the predefined ATSC muxes. I can compile a version later and upload a link if you need it for amlogic.


    chewitt I wanted to make sure enough people had tested before submitting. It looks like things are pretty solid, so I'll take a look at updating my readme instructions and read the wiki on how to submit addons. (still learning) :)

  • edit4ever: Are you missing the logging.ini file in the kodi addon? I get:

    Code
    Traceback (most recent call last):
     File "/storage/.kodi/addons/tools.module.sd2xmltv/sd2xmltv.py", line 375, in <module>
       logging.config.fileConfig(u"logging.ini", disable_existing_loggers=True)
     File "/home/chewitt/LibreELEC.70-official/build.LibreELEC-WeTek_Play.arm-7.0.2/Python-2.7.11/.install_pkg/usr/lib/python2.7/logging/config.py", line 77, in fileConfig
     File "/home/chewitt/LibreELEC.70-official/build.LibreELEC-WeTek_Play.arm-7.0.2/Python-2.7.11/.install_pkg/usr/lib/python2.7/logging/config.py", line 113, in _create_formatters
     File "/home/chewitt/LibreELEC.70-official/build.LibreELEC-WeTek_Play.arm-7.0.2/Python-2.7.11/.install_pkg/usr/lib/python2.7/ConfigParser.py", line 607, in get


    when running the grabber.

    Edited once, last by jucaroba ().