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.
Uninstalled the zap2it module, deleted the zap2it folder under userdata, addon-data, and tools.module.zap2xml. Rebooted stick, checked configuration page and XMLTV: tv_grab_zap2xml is a simple wrapper for zap2xml.py was gone. Installed Zap2xml module again and setup the module.


2016-07-06 13:21:44.654 spawn: cat: can't open '/storage/.kodi/userdata/addon_data/tools.module.zap2xml/xmltv.xml': No such file or directory

2016-07-06 13:21:44.655 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: no output detected

2016-07-06 13:21:44.655 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: grab returned no data

Going to try my second zap2it user name.
Tried a different user name and same thing. One thing I have noticed, using either user name, when it starts out showing this
"spawn: Executing "/storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml""

It takes about 3 or 4 minutes, but does not create the xmltv.xml file.
In order for this new addon to create the xmltv file, I dropped to the very basic, one day and all the other options disabled. It did create the xmltv file, so now I will start adding days and options.
I set the options for 2 days, append extra details and download program icons, with delay set to 0. Did not work.
Exception
error<class 'urllib2.URLError'>
Traceback (most recent call last):
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 1992, in <module>
main()
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 1902, in main
parseGrid(fn) #data read in and unicode it
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 1082, in parseGrid
p.feed(b)
File "/home/kszaq/LibreELEC.tv/build.LibreELEC-S805.arm-7.0.1.3/Python-2.7.11/.install_pkg/usr/lib/python2.7/HTMLParser.py", line 117, in feed
File "/home/kszaq/LibreELEC.tv/build.LibreELEC-S805.arm-7.0.1.3/Python-2.7.11/.install_pkg/usr/lib/python2.7/HTMLParser.py", line 161, in goahead
File "/home/kszaq/LibreELEC.tv/build.LibreELEC-S805.arm-7.0.1.3/Python-2.7.11/.install_pkg/usr/lib/python2.7/HTMLParser.py", line 327, in parse_starttag
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 704, in handle_starttag
globals()['on_%s' % tag](self, tag, attrs)
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 342, in on_td
data = getURL(urlRoot + "gridDetailService?rtype=pgmimg&pgmId=" + cp)
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 209, in getURL
data = br.open(url).get_data()
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_mechanize.py", line 203, in open
return self._mech_open(url, data, timeout=timeout)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_mechanize.py", line 230, in _mech_open
response = UserAgentBase.open(self, request, data)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_opener.py", line 193, in open
response = urlopen(self, req, data)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_urllib2_fork.py", line 344, in _open
'_open', req)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_urllib2_fork.py", line 332, in _call_chain
result = func(*args)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_urllib2_fork.py", line 1142, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_urllib2_fork.py", line 1118, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
Can I ask what zip code and lineup (broadcast/cable/etc) you are using?
48346 OTA.
Thanks... I'll run some tests tomorrow and see what I find.
Just want to make sure you have the following set on your zap2it preferences:

Additional Settings:
Show six hour grid
Show only my favorite channels in the grid

Both should be checked and you should have placed a number of channels in the "My favorite channels" column as well. Since zap2xml pulls the data from the actual web page, whatever channels are showing up when you're on the web page will get added to the download.

If you've checked the above and are still getting 69 channels on zap2xml let me know.
Just checked and the guide was showing all stations, even the ones that I can't receive. Enabled "Show only my favorite channels in the grid", now guide only shows my favorites.

Will test tomorrow.
2016-07-07 13:42:54.845 spawn: Executing "/storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml"

2016-07-07 13:43:12.074 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: grab took 18 seconds

2016-07-07 13:43:12.093 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: parse took 0 seconds

2016-07-07 13:43:12.093 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: channels tot= 38 new= 0 mod= 0

2016-07-07 13:43:12.093 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: brands tot= 0 new= 0 mod= 0

2016-07-07 13:43:12.093 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: seasons tot= 0 new= 0 mod= 0

2016-07-07 13:43:12.093 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: episodes tot= 0 new= 0 mod= 0

2016-07-07 13:43:12.093 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: broadcasts tot= 0 new= 0 mod= 0
perfect - now you're only downloading the stations that are in your favorites. The other data (seasons/episodes/broadcasts/etc) will fill in once you set the channel epg source to zap2xml instead of sd2xmltv. You can do this for whichever channels you want to test with.
I made 5 different test and none of them updated the xml file.
Channels Scanned 38 38 38 38 38
Days to Cache 3 3 2 2 2
Download Channel Icons
Include All Channels
Append Extra Details to program description x
Download Program Icons x x
Download Extra Program details x
Time Delay 0.25 0.25 0 0.25 0.25
Grab took seconds 646 24 16 116 703
Pass or Fail to get data F F F F F
the last scan I ran the grab took 703 seconds, but never updated the xmltv.xml file.
On your tvheadend CONFIGURATION > CHANNEL/EPG > CHANNELS tab, make sure that the channel that you want to test for zap2xml epg source doesn't also have the sd2xmltv epg selected. This is where I believe the prioirty setting makes a difference in Tvheadend. If zap2xml is a lower priority (higher number) than sd2xmltv and both are selected as an epg source for channel, it will use sd2xmltv. I could be wrong here - but worth checking. You could also change the zap2xml to be prioirty 1 and sd2xmltv priority 2 and then it should be ok to have them both checked as an epg source for a channel.

If you could post the zap2xml log I'd like to take a look. Thanks!
You were correct, I had forgotten to change the epg source to zap2xm. Now it is working. Will start adding days and options.