edit4ever / script.module.zap2epg

zap2epg - EPG grabber for USA/Canada
GNU General Public License v3.0
41 stars 25 forks source link

zap2epg doesn't run when trying to retrieve OTA data. #1

Closed chrisyroid closed 6 years ago

chrisyroid commented 6 years ago

Hi. I installed this on Kodi and receive these errors when trying to run zap2epg.

2017/12/12 10:38:08 Kodi settings version is: None
2017/12/12 10:38:08 Running zap2epg-0.6.1 for zipcode: 87110 and lineup: Local Over the Air Broadcast
2017/12/12 10:38:08 Accessing Tvheadend channel list from: http://127.0.0.1:9981
2017/12/12 10:38:08 Exception: main
Traceback (most recent call last):
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 701, in mainRun
    tvhMatchGet()
  File "/storage/.kodi/addons/script.module.zap2epg/zap2epg.py", line 115, in tvhMatchGet
    channels = json.load(response)
  File "/usr/lib/python2.7/json/__init__.py", line 291, in load
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
  File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe0 in position 0: unexpected end of data
edit4ever commented 6 years ago

Looks like an issue with the TVheadend channel match function. It likely means that there is an invalid charcter being used in the channel name transmitted by the station. Try turning off the "Append Tvheadend Service Name" option in the settings and rerun. If that works - I'd like to get a copy of your tvheadend service list so I can see what the invalid character is.

edit4ever commented 6 years ago

Enter the following into a web browser and then save the response to a text file and upload it here.

http://YOUR.IP.ADDRESS:9981/api/mpegts/service/grid

replace YOUR.IP.ADDRESS with the ip address of your tvheadend server.

chrisyroid commented 6 years ago

Okay. It worked! Here's my service list: https://pastebin.com/cvZiSG9k

edit4ever commented 6 years ago

Wow - you have a good antenna! 54 channels :-)

I'll take a look for the issue and work on a solution. That option allows Tvheadend to automatically match the epg source for the channels. So it's a nice function to have when setting up a lot of channels!

edit4ever commented 6 years ago

BTW - whatever is on channel 43 (647 Mhz) is the issue - it has strange characters in the transmitted service name. If you disable that channel on tvheadend, you should be able to turn the "Append Tvheadend Service Name" option back on and then tvheadend will automatch the epg sources.

chrisyroid commented 6 years ago

Huh. Just checked....I already disabled that channel.

edit4ever commented 6 years ago

If you wouldn't mind - I'd alos like to see the response to the following from tvheadend:

http://YOUR.IP.ADDRESS:9981/api/channel/grid?all=1&limit=999999999&sort=name

I want to see if it has the same characters listed. Thanks!

chrisyroid commented 6 years ago

Okay. Here you go: https://pastebin.com/xwXm2iyw

I'm going to be gone for a while. BTW Kodi is taking a long time to download the EPG.

edit4ever commented 6 years ago

Yeah - if you have it set for full extra options and a full 14 days of data - the first run will take awhile.

If you want to stop it (just restart kodi) and try this test version it should only try to match enabled channels - which should solve your issue:

script.module.zap2epg-0.6.2-TEST.zip

chrisyroid commented 6 years ago

Awesome! I got it working!

edit4ever commented 6 years ago

Glad to hear it! Can you confirm that the "Append Tvheadend Service Name" works for you with the TEST version?

chrisyroid commented 6 years ago

The test version works. Although the EPG wouldn't update until I re-ran the grabber within the Tvheadend GUI.