Unable to load Zap2epg guide data in TVHeadend or Kodi
#1
I recently installed Kodi 19 on Linux Mint 20.1.  I have been struggling with getting epg data ever since.  Through much searching and researching, I decided to try TVHeadend as the PVR, with Zap2epg for the guide data (for which I have an account).  I am pulling over the air channels from my HDHomeRun Extend.  TVHeadend/Kodi are able to view the channels correctly, but I can't get the epg data.  I am no expert, but it appears to me that TVHeadend is looking for the converted xml file in the hts directory, but it is populated and located in my user name directory, under the .kodi files.  If that is the issue, how do I redirect to the correct location? Or, do I have to somehow move .kodi to hts?  If it is a different issue, I'm open to suggestions.  But, maybe I'm misunderstanding something in Kodi?

This is the Kodi log post:  https://paste.ubuntu.com/p/HW8kdBT2RP/

This is the error message from TVHeadend:

2021-03-20 20:04:11.031 xmltv: /bin/tv_grab_zap2epg: grab /bin/tv_grab_zap2epg
2021-03-20 20:04:11.034 spawn: Executing "/bin/tv_grab_zap2epg"
2021-03-20 20:04:11.045 spawn: /bin/tv_grab_zap2epg: line 27: cd: /home/hts/.kodi/userdata/addon_data/script.module.zap2epg: No such file or directory
2021-03-20 20:04:11.045 spawn: /bin/tv_grab_zap2epg: line 28: python: command not found
2021-03-20 20:04:11.047 spawn: cat: /home/hts/.kodi/userdata/addon_data/script.module.zap2epg/xmltv.xml: No such file or directory
2021-03-20 20:04:11.048 xmltv: /bin/tv_grab_zap2epg: no output detected
2021-03-20 20:04:11.048 xmltv: /bin/tv_grab_zap2epg: grab returned no data

Thanks for any assistance that can be provided!
Reply
#2
I am not familiar with zap2epg but I have used zap2xml which is probably similar.  There is a guide to setting it up at https://freetoairamerica.wordpress.com/2...-frontend/ but it is rather dated at this point, but I don't think much has changed.  The only thing about zap2xml is that sometime in the last year or two it seems the author stopped actively maintaining it and let the website where it was hosted go, so the only place you can get it now is on the Wayback Machine, and it appears that someone updated that article to link there rather than the original site.  if you can't get zap2epg working I'd give zap2xml a try, note that it requires you have Perl installed but most Linux distros do.

That said, looking at your error messages it appears that the real problem is that it is unable to cd to /home/hts/.kodi/userdata/addon_data/script.module.zap2epg so you may need to change to the hts user and create that directory.  Something like:

sudo su hts
(assuming that is successfulSmile
mkdir /home/hts/.kodi/userdata/addon_data/script.module.zap2epg
exit


Although the fact that the directory doesn't exist may be an indication that you did not follow all the instructions for installing zap2epg.  I have absolutely zero familiarity with that program, so I don't really know for sure.  If the directory does exist and you still get that error, then it's an ownership/permissions issue, in that case you probably need to change the permissions so that both zap2epg and Tvheadend can access that directory.
Reply
#3
(2021-03-25, 01:19)oldtvwatcher Wrote: I am not familiar with zap2epg but I have used zap2xml which is probably similar.  There is a guide to setting it up at https://freetoairamerica.wordpress.com/2...-frontend/ but it is rather dated at this point, but I don't think much has changed.  The only thing about zap2xml is that sometime in the last year or two it seems the author stopped actively maintaining it and let the website where it was hosted go, so the only place you can get it now is on the Wayback Machine, and it appears that someone updated that article to link there rather than the original site.  if you can't get zap2epg working I'd give zap2xml a try, note that it requires you have Perl installed but most Linux distros do.

That said, looking at your error messages it appears that the real problem is that it is unable to cd to /home/hts/.kodi/userdata/addon_data/script.module.zap2epg so you may need to change to the hts user and create that directory.  Something like:

sudo su hts
(assuming that is successfulSmile
mkdir /home/hts/.kodi/userdata/addon_data/script.module.zap2epg
exit


Although the fact that the directory doesn't exist may be an indication that you did not follow all the instructions for installing zap2epg.  I have absolutely zero familiarity with that program, so I don't really know for sure.  If the directory does exist and you still get that error, then it's an ownership/permissions issue, in that case you probably need to change the permissions so that both zap2epg and Tvheadend can access that directory.
Thank you so much for your response.  Zap2epg is a Kodi addon that pulls Zap2it guides into a  file and converts it to a .xml file, which then (supposedly) gets accessed by Kodi. 

I will work on the suggestions from the link you sent.  I did look at it while starting this whole process, but wasn't able to redirect the file location because it automatically assumes the file location is in the hts directory.  I'll continue to try to work with the instructions.  Maybe if I try again! Thanks for your help!
Reply
#4
Keep in mind that if Zap2epg is putting the file in one location and Tvheadend is expecting it in another, in Linux it is possible to symlink a file (or a directory) so it essentially appears in both places.  Such capability can be useful if you don't want to be bothered having to move a file from one location to another each time it is rewritten.
Reply
#5
(2021-03-25, 06:04)oldtvwatcher Wrote: Keep in mind that if Zap2epg is putting the file in one location and Tvheadend is expecting it in another, in Linux it is possible to symlink a file (or a directory) so it essentially appears in both places.  Such capability can be useful if you don't want to be bothered having to move a file from one location to another each time it is rewritten.

Thank you so much!  I am also a Linux newbie, so I had to research how to do a symlink.  That worked fine.  However, now my Internal XMLTV.tv_grab_zap2epg is a simple grabber for USA-Canada no longer shows as an option in the EPG Grabber Modules in TVHeadend.  I'm not sure how to bring it back!  I'd greatly appreciate any assistance!
Reply
#6
Solved, thanks to edit4ever and his zap2epg zip file.
Reply
#7
BTW, not totally abandoned!  I found it still on github updated 12 days ago.  There is even a "LATEST" 2.0.2 for Kodi 19/Python 3.  Don't try the repo, it is for Python 2.7 only.
 https://github.com/edit4ever/script.module.zap2epg/releases/tag/v2.0.2
Reply

Logout Mark Read Team Forum Stats Members Help
Unable to load Zap2epg guide data in TVHeadend or Kodi0