Kodi Community Forum

Full Version: Zap2xml for ATSC in OpenELEC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
i thought i was suppose to be patient and let you work through the LE 8 stuff first.  My LE 8 setup is working great.

This is Kodi 18   LE 9.  Millhouse builds.  

The set up all works.   I  execute the grabber and it fails.  Below is the log info. 

2017-11-29 19:00:28.556 xmltv: /storage/.kodi/addons/script.module.zap2epg/bin/tv_grab_zap2epg: grab /storage/.kodi/addons/script.module.zap2epg/bin/tv_grab_zap2epg
2017-11-29 19:00:28.566 spawn: Executing "/storage/.kodi/addons/script.module.zap2epg/bin/tv_grab_zap2epg"
2017-11-29 19:00:28.881 spawn: Traceback (most recent call last):
2017-11-29 19:00:28.881 spawn:   File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 731, in 
2017-11-29 19:00:28.881 spawn:     mainRun(userdata)
2017-11-29 19:00:28.881 spawn:   File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 82, in mainRun
2017-11-29 19:00:28.881 spawn:     if zipcode.isdigit():
2017-11-29 19:00:28.881 spawn: AttributeError: 'NoneType' object has no attribute 'isdigit'
2017-11-29 19:00:29.277 xmltv: /storage/.kodi/addons/script.module.zap2epg/bin/tv_grab_zap2epg: grab took 1 seconds
2017-11-29 19:00:31.133 xmltv: /storage/.kodi/addons/script.module.zap2epg/bin/tv_grab_zap2epg: parse took 1 seconds
(2017-11-30, 02:14)hagertyoh Wrote: [ -> ]2017-11-29 19:00:28.881 spawn:   File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 82, in mainRun
2017-11-29 19:00:28.881 spawn:     if zipcode.isdigit():
2017-11-29 19:00:28.881 spawn: AttributeError: 'NoneType' object has no attribute 'isdigit'
I know - the issue is that Kodi 18 changes the way the information is stored in the settings files - so I have to rework how I grab that information and pass it to the grabber.

I'll take a look when I'm sitting on a lounge chair in the Carribbean next week and see if I can make it work for both.  I'll probably just add a try for Kodi 17 and then another try for Kodi 18 settings before failing with the exception.  Once I have a version ready I'll post it for you to test!  :-)
Hopefully you enjoy your time there. I am in no rush. I am using my LE 8 system to gather the data. One a week I copy the xmltv and cache to Le 9. The system picks it up that way.
@hagertyoh - here is a test version to try on LE9:

https://www.dropbox.com/s/l15q2yvrx9cmo7...9.zip?dl=0

This should actually be compatible with both Kodi 17 (LE8) and Kodi18 (LE9) versions.

Let me know how it goes - thanks!
The grabber seemed to work. I received no errors and the log showed it found shows. I Probably need to watch it a few days as I could not get the old guide data to delete.

One thing I did notice is I had to actually select the channels I wanted. It seemed the other version down loaded all of them when nothing was selected. Not a big deal but did not know if that was your intention.
@hagertyoh - thanks for the update.  If you don't have any channels setup it should download all channels.  Were you getting an error before you added channels?

If possible - it would be great if you could run a test by uninstaling the zap2epg addon on LE, deleting the userdata folder as well, and trying a clean install.

I know that can be a bit time consuming, so if you can't do it right away - no worries.  Also, I'd love to see a log from what you have now and one after you clean install without setting up any channels.

Thanks!
(2017-12-01, 04:25)edit4ever Wrote: [ -> ]@hagertyoh - thanks for the update.  If you don't have any channels setup it should download all channels.  Were you getting an error before you added channels?

If possible - it would be great if you could run a test by uninstaling the zap2epg addon on LE, deleting the userdata folder as well, and trying a clean install.

I know that can be a bit time consuming, so if you can't do it right away - no worries.  Also, I'd love to see a log from what you have now and one after you clean install without setting up any channels.

Thanks!

Here is the log file with no channels selected.  I will do a clean install tomorrow and get a copy of the log.

2017/11/30 21:51:46 Kodi settings version is: 2
2017/11/30 21:51:46 Running zap2epg for zipcode: 45840 and lineup: Local Over the Air Broadcast
2017/11/30 21:51:46 Accessing Tvheadend channel list from: 127.0.0.1
2017/11/30 21:51:46 18 Tvheadend channels found...
2017/11/30 21:51:46 Downloading guide data for: 1512093600
2017/11/30 21:51:47 Parsing 1512093600.json.gz
2017/11/30 21:51:47 Exception: parseStations
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 369, in parseStations
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:47 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:47 Downloading guide data for: 1512104400
2017/11/30 21:51:47 Parsing 1512104400.json.gz
2017/11/30 21:51:47 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:47 Downloading guide data for: 1512115200
2017/11/30 21:51:48 Parsing 1512115200.json.gz
2017/11/30 21:51:48 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:48 Downloading guide data for: 1512126000
2017/11/30 21:51:48 Parsing 1512126000.json.gz
2017/11/30 21:51:48 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:48 Downloading guide data for: 1512136800
2017/11/30 21:51:48 Parsing 1512126000.json.gz
2017/11/30 21:51:48 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:48 Downloading guide data for: 1512136800
2017/11/30 21:51:49 Parsing 1512136800.json.gz
2017/11/30 21:51:49 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:49 Downloading guide data for: 1512147600
2017/11/30 21:51:49 Parsing 1512147600.json.gz
2017/11/30 21:51:49 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:49 Downloading guide data for: 1512158400
2017/11/30 21:51:50 Parsing 1512158400.json.gz
2017/11/30 21:51:50 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:50 Downloading guide data for: 1512169200
2017/11/30 21:51:50 Parsing 1512158400.json.gz
2017/11/30 21:51:50 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:50 Downloading guide data for: 1512169200
2017/11/30 21:51:50 Parsing 1512169200.json.gz
2017/11/30 21:51:50 Exception: parseEpisodes
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 418, in parseEpisodes
    if skey in stationList:
TypeError: argument of type 'NoneType' is not iterable
2017/11/30 21:51:50 Creating xmltv.xml file...
2017/11/30 21:51:50 Writing Stations to xmltv.xml file...
2017/11/30 21:51:50 Writing Episodes to xmltv.xml file...
2017/11/30 21:51:50 Checking for old cache files...
2017/11/30 21:51:50 Deleting old cache: SH02402794.json
......
2017/11/30 21:51:51 Deleting old cache: SH01324196.json
2017/11/30 21:51:51 zap2epg completed in 4.8 seconds.
2017/11/30 21:51:51 0 Stations and 0 Episodes written to xmltv.xml file.
is there a better way to post the logs?
The clean install with no channel lineup looks the same as the previous log file except no Cache files to delete.
Perfect - that's what I needed to see.  I forgot there is another place that Kodi 18 will return None instead of "" for my request.  It's these little changes that make us need to keep testing!!  :-)

For posting logs - short segments can just be pasted here, but it helps readability if you use the </> code format button so it creates a smaller scrolling box.

For longer or full logs, you can use something easy like https://pastebin.com/ and just paste the link it provides.

Thanks!
This update should fix it:

https://www.dropbox.com/s/fujuo4ye7m1hry...9.zip?dl=0

Should work on both LE8 (Kodi 17) and LE 9 (Kodi 18)

Thanks!
Hope you had a great Thanksgiving (if you celebrate Smile

Things seemed to be going so well...clean, smooth updates....and then I checked this morning and this (logfile output below).....

Thought I had a DNS ipaddr issue but have since fixed that (at least, I'd like to think so Sad Any ideas? Thought I was on V0.5.2 or V0.5.3(?) but it shows V0.5.4, and I'm not sure when I updated to that one. As a suggestion...might be informative to include version numbers in the log file. That way any particular problem might be more traceable back to a specific version.

Thanks and cheers.....

zap2epg.log
--------------
08:26:58 Running zap2epg for zipcode: 94086 and lineup: Local Over the Air Broadcast
2017/12/01 08:26:58 Exception: main
Traceback (most recent call last):
File "/home/osmc/.kodi/addons/script.module.zap2epg/zap2epg.py", line 686, in mainRun
tvhMatchGet()
File "/home/osmc/.kodi/addons/script.module.zap2epg/zap2epg.py", line 101, in tvhMatchGet
response = urllib2.urlopen(channels_url)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1227, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
URLError: <urlopen error [Errno -2] Name or service not known>
@stephr1 excellent point about the version number - I will do that.  In the meantime - try updating to this version and see if it helps:

https://www.dropbox.com/s/fujuo4ye7m1hry...9.zip?dl=0

If not - the issue is with accessing tvheadend to get the channel match - so you can also try turning off the "Append Tvheadend Service Name" option.

Let me know how it goes.  Thanks!
that worked.  everything working great no errors.
Update (12/2/17.1):

Checked your changelog.txt file and it does show v0.5.4 so what I have is correct and you have not yet rolled the version number. Ignore my last line here Smile

Orig (12/2/17.0)

OK. Did the update but have not yet done any testing on it (system should have an attempted update by tomorrow morning anyways).

With your latest update it shows v0.5.4 (which was the also last update). Is that correct? Or should it show something different?

(2017-12-02, 01:14)edit4ever Wrote: [ -> ]@stephr1 excellent point about the version number - I will do that.  In the meantime - try updating to this version and see if it helps:

https://www.dropbox.com/s/fujuo4ye7m1hry...9.zip?dl=0

If not - the issue is with accessing tvheadend to get the channel match - so you can also try turning off the "Append Tvheadend Service Name" option.

Let me know how it goes.  Thanks!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48