tvheadend, ATSC and epg...

  • Great - thanks for the updated log. Looks like "Getting: gridDetailService?pgmId=EP024717260011" failed to download and when I check - the file doesn't exist. This means that zap2it/screener is not providing some details for episodes. It also points to the need to fix the code to handle download failures.

    Can you try the zap2xml file that I attached in my previous post?? That one has a line to skip the data parse if the episode details file doesn't exist.

  • OK - please add

    log.pout("[D] Parsing: " + cp,'info')

    ahead of line 858 - so it looks like this:

    Code
    def parseJSOND(fn):
        global programs, cp
        log.pout("[D] Parsing: " + cp,'info')
        with gzip.open(fn,"rb") as f:


    Then rerun and post the log output. Thanks! I'm trying to see if your is episode or guide data issue.

  • OK - now look in the cache folder and see if there is a file labeled: EP025837820003.js.gz

    That's the file it failed on. It either didn't download - or downloaded blank. That will tell me what I need to focus on.

    Thanks!

  • Awesome! you just helped identify the real problem. Now I have to figure out a solution. Stand by... :)
    [hr]
    Do me a favor - delete that file, rerun the grabber and post the log.
    [hr]
    OK - I've put in some code to skip empty files - I think that will solve the issue.

    Download/unzip the following and replace your zap2xml.py file.

    zap2xml (1).zip

    Rerun the grabber and post the log. Thanks!!

    Edited once, last by edit4ever (February 25, 2017 at 7:49 PM).

  • Did it stop at the same place:

    Code
    [D] Parsing: EP000019520052
    Getting: http://tvschedule.zap2it.com/tvlistings/gridDetailService?pgmId=EP000019520056
    Exception
    error<class 'urllib2.URLError'>
    Traceback (most recent call last):

    Or was it in a different place? (i.e. a different episode #)

  • Can I ask how many channels in your lineup and how many days of guide data you have set to download? You may have run into the issue of too much data to download since it hadn't been running well in awhile. It should be fine going forward - but you could always set the delay function to help offset server timeouts.

    Edited once, last by edit4ever (February 25, 2017 at 9:18 PM).

  • Cool - let me know if it hangs in the next day or two. I'll also wait for Stepher to test before I put out an updated addon release.
    [hr]
    As a side note - that is not a large number of stations/downloads, so let's keep an eye out for errors. You can try adding a day or two to the download # of days setting every few days to see if the server is good. I can download a full 14 days for 19 stations - with my cron updates set for twice a day.

    Edited once, last by edit4ever (February 25, 2017 at 10:21 PM).

  • And here I am :)

    (Should have been "disabled :( <Re-enabled> download xtra program details and download was successful and complete (no errors cast) this morning. I had planned to separately test both xtra program details and download program icons. However, I'm fairly certain I inadvertently left program icons enabled last night. So it's also been confirmed OK anyways. Looks like xtra program details is the culprit (for me).

    Before you get too concerned, tho, I'm not sure if I have the latest code you've produced. I updated my zap2xml.py file using the code you posted in msg #186. Do I need to update zap2zml.py using the file you reference in msg #197 and retest?

    -----------------------------------------------------------------------

    BTW - I'm curious if there a good reason to update 2x (or more) a day. Maybe to ensure a valid download is completed (altho, if an error is cast on the 2nd/later download, doesn't do much good)?

    Thx and cheers....

    Edited once, last by stepher (February 26, 2017 at 9:15 PM).

  • It would be good to use the updated code in post #197 and let that run for a few days to see if it generates any errors.

    As for how many times to update...it depends on how much you want to download at once. Since the guide data is pulled in 6 hour increments, you could update 4x a day and a little bit of new data should download each time. If you use the standard cron settings in tvheadend (didn't make any changes) it downloads twice a day which should work for most setups.

    Thanks again for being a part of the testing!

  • OK. I updated with the new zap2xml.py file, enabled xtra program details and restarted TVH. Sorry for the bad news but actually seems worse than before. Also noticed no msgs about clearing the cache at the beginning of the log file. Here's the log error:

    Edited once, last by stepher (February 26, 2017 at 10:55 PM).