Kodi Community Forum
TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) (/showthread.php?tid=282157)



RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - coremailrx8 - 2018-04-05

You are absolutely right, and I now I feel silly. I didn't realized the line 99 was making reference to the xml file, so it never occurred to me to check. Thanks!
Code:
<display-name lang="en">Hallmark Movies & Mysteries</display-name>



RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - coremailrx8 - 2018-04-05

(2018-04-05, 07:26)primaeval Wrote: Send me a link to the xmltv file.
Usually it is an unescaped xml character.
Something like & that should be &amp;
Otherwise it is probably a unicode character.
 Seems like it is downloading that way from the source. IPTV simple is not giving me a problem. Is there a way around that? Thanks!

Edit: Line 199 is the first of many using "&"


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - primaeval - 2018-04-05

(2018-04-05, 19:00)coremailrx8 Wrote:
(2018-04-05, 07:26)primaeval Wrote: Send me a link to the xmltv file.
Usually it is an unescaped xml character.
Something like & that should be &amp;
Otherwise it is probably a unicode character.
 Seems like it is downloading that way from the source. IPTV simple is not giving me a problem. Is there a way around that? Thanks!

Edit: Line 199 is the first of many using "&" 
 It is not very easy to fix because it is using the ElementTree library to parse the xmltv and that requires correct xml syntax.

Do you have no control over the xmltv file?

I could put in a bodge to try and pre-process the xmltv file and add the amp; to naked &s.
It means making sure the & don't escape any other xml code.

If it comes from zap there was a switch to make it output the correct escaped characters.


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - coremailrx8 - 2018-04-05

It comes directly from the stream provider, PS Vue. Not from third party guide.

Simple IPTV simple doesn't seem to have a problem with it, so I thought it may be easy to implement in your parser. But if it is too much trouble, don't worry about it. Thanks!!!


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - primaeval - 2018-04-05

(2018-04-05, 21:10)coremailrx8 Wrote: It comes directly from the stream provider, PS Vue. Not from third party guide.

Simple IPTV simple doesn't seem to have a problem with it, so I thought it may be easy to implement in your parser. But if it is too much trouble, don't worry about it. Thanks!!!
Try this krypton_xmltv branch:
https://github.com/primaeval/script.tvguide.fullscreen/tree/kypton_xmltv

It should correct all the & to &amp;
https://github.com/primaeval/script.tvguide.fullscreen/commit/615d9b7826733e79f31867febed37216d0243565

There might be some more xml characters that need escaping
Code:
"   &quot;
'   &apos;
<   &lt;
>   &gt;
&   &amp;

If it works I'll put an optional switch in one of the Labs and release it.

PS Vue really should know better. Could you let them know they are generating nonsense xml.


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - Doctor Eggs - 2018-04-05

(2018-04-04, 17:32)mzup Wrote:
(2018-04-04, 17:24)primaeval Wrote: Is the actual exit.on.back setting in settings.xml changing?

This is the bit of code that closes TVGF if it is set to true and play.minimized is false (play in the small window).
https://github.com/primaeval/script.tvguide.fullscreen/blob/80337aed991572111d33796bb6041a449a0a4ecb/gui.py#L969
 Yes it does change in the xml file.  It is not a big deal to me. I just wanted to point it out. 
I haven't been able to reproduce this where the settings.xml file is getting reset. I've been running the WMC skin for awhile and have not run across this on my Windows 10 or RPi2's running Libreelec instances.


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - coremailrx8 - 2018-04-06

(2018-04-05, 21:36)primaeval Wrote:
(2018-04-05, 21:10)coremailrx8 Wrote: It comes directly from the stream provider, PS Vue. Not from third party guide.

Simple IPTV simple doesn't seem to have a problem with it, so I thought it may be easy to implement in your parser. But if it is too much trouble, don't worry about it. Thanks!!!
Try this krypton_xmltv branch:
https://github.com/primaeval/script.tvguide.fullscreen/tree/kypton_xmltv

It should correct all the & to &amp;
https://github.com/primaeval/script.tvguide.fullscreen/commit/615d9b7826733e79f31867febed37216d0243565

There might be some more xml characters that need escaping
Code:
"   &quot;
'   &apos;
<   &lt;
>   &gt;
&   &amp;

If it works I'll put an optional switch in one of the Labs and release it.

PS Vue really should know better. Could you let them know they are generating nonsense xml. 
 Thanks!!!


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - coremailrx8 - 2018-04-07

(2018-04-05, 21:36)primaeval Wrote:
(2018-04-05, 21:10)coremailrx8 Wrote: It comes directly from the stream provider, PS Vue. Not from third party guide.

Simple IPTV simple doesn't seem to have a problem with it, so I thought it may be easy to implement in your parser. But if it is too much trouble, don't worry about it. Thanks!!!
Try this krypton_xmltv branch:
https://github.com/primaeval/script.tvguide.fullscreen/tree/kypton_xmltv

It should correct all the & to &amp;
https://github.com/primaeval/script.tvguide.fullscreen/commit/615d9b7826733e79f31867febed37216d0243565

There might be some more xml characters that need escaping
Code:
"   &quot;
'   &apos;
<   &lt;
>   &gt;
&   &amp;

If it works I'll put an optional switch in one of the Labs and release it.

PS Vue really should know better. Could you let them know they are generating nonsense xml. 
 Happy to say it worked!!!! It was able to parse the EPG channels/data on Kodi 18. Thanks!!!


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - primaeval - 2018-04-08

Here is a new addon for you struggling with Webgrab.

xmltv Meld

plugin.program.xmltv.meld
  • Joins xmltv providers into one xmltv file.
  • Current sources are from rytec, zap, koditvepg.

https://forum.kodi.tv/showthread.php?tid=330668


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - doktourtv - 2018-04-09

Hello. I am suddenly having a problem that I cannot solve and I am sure it is not your program, however the error message you may be able to direct me to a solution.

I am using webgrab+ plus to create an the guide.xml as I have been for many years, without problems.

There have been no changes to how I obtain the epg file.
The problem is on my raspberry pi3 running raspbian and kodi 17. Up until today the guide.xml loaded without error. Today the guide xml will not load in tvguide fullscreen on the rapsberry pi and the kodi log shows the following error:

14:58:58.913 T:1365168896   ERROR:   File "/home/pi/.kodi/addons/script.tvguide.fullscreen/source.py", line 534, in _updateChannelAndProgramListCaches
14:58:58.920 T:1365168896   ERROR:     self.source.KEY, channel.weight, self.source.KEY])
14:58:58.921 T:1365168896   ERROR: ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
15:00:11.435 T:1340003072 WARNING: CSkinInfo: failed to load skin settings
15:00:12.026 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 7004
15:00:12.079 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 7100
15:00:12.093 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 4323
15:00:42.979 T:1348391680   ERROR: Traceback (most recent call last):
15:00:42.979 T:1348391680   ERROR:   File "/home/pi/.kodi/addons/script.tvguide.fullscreen/source.py", line 534, in _updateChannelAndProgramListCaches
15:00:42.984 T:1348391680   ERROR:     self.source.KEY, channel.weight, self.source.KEY])
15:00:42.984 T:1348391680   ERROR: ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.


The error seems to be complaining about the utf-8 encoding, however the guide.xml has always been created in utf-8 and and worked fine until today.

I tried loading the same guide.xml file into tvguide fullscreen running on a windows machine and it loads perfectly without error.

Here are the top few lines of my guide.xml:

<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version V2.1.5 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
  <channel id="BBC America ">
    <display-name lang="en">BBC America </display-name>
    <url>http://www.yo.tv</url>
  </channel>
  <channel id="E!">
    <display-name lang="en">E!</display-name>
    <url>http://www.yo.tv</url>
  </channel>


 Any guidance would be appreciated.

Thank you


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - primaeval - 2018-04-09

(2018-04-09, 21:20)doktourtv Wrote: Hello. I am suddenly having a problem that I cannot solve and I am sure it is not your program, however the error message you may be able to direct me to a solution.

I am using webgrab+ plus to create an the guide.xml as I have been for many years, without problems.

There have been no changes to how I obtain the epg file.
The problem is on my raspberry pi3 running raspbian and kodi 17. Up until today the guide.xml loaded without error. Today the guide xml will not load in tvguide fullscreen on the rapsberry pi and the kodi log shows the following error:

14:58:58.913 T:1365168896   ERROR:   File "/home/pi/.kodi/addons/script.tvguide.fullscreen/source.py", line 534, in _updateChannelAndProgramListCaches
14:58:58.920 T:1365168896   ERROR:     self.source.KEY, channel.weight, self.source.KEY])
14:58:58.921 T:1365168896   ERROR: ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
15:00:11.435 T:1340003072 WARNING: CSkinInfo: failed to load skin settings
15:00:12.026 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 7004
15:00:12.079 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 7100
15:00:12.093 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 4323
15:00:42.979 T:1348391680   ERROR: Traceback (most recent call last):
15:00:42.979 T:1348391680   ERROR:   File "/home/pi/.kodi/addons/script.tvguide.fullscreen/source.py", line 534, in _updateChannelAndProgramListCaches
15:00:42.984 T:1348391680   ERROR:     self.source.KEY, channel.weight, self.source.KEY])
15:00:42.984 T:1348391680   ERROR: ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.


The error seems to be complaining about the utf-8 encoding, however the guide.xml has always been created in utf-8 and and worked fine until today.

I tried loading the same guide.xml file into tvguide fullscreen running on a windows machine and it loads perfectly without error.

Here are the top few lines of my guide.xml:

<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version V2.1.5 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
  <channel id="BBC America ">
    <display-name lang="en">BBC America </display-name>
    <url>http://www.yo.tv</url>
  </channel>
  <channel id="E!">
    <display-name lang="en">E!</display-name>
    <url>http://www.yo.tv</url>
  </channel>


 Any guidance would be appreciated.

Thank you
 Usually there is a clue to the xmltv line and character number a bit lower in the kodi.log.
Some unicode in the channel id could cause problems. I've added an é in there before and it coped.
pm me a link to the xmltv file and I'll see if I can spot it.


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - doktourtv - 2018-04-09

(2018-04-09, 21:26)primaeval Wrote:
(2018-04-09, 21:20)doktourtv Wrote: Hello. I am suddenly having a problem that I cannot solve and I am sure it is not your program, however the error message you may be able to direct me to a solution.

I am using webgrab+ plus to create an the guide.xml as I have been for many years, without problems.

There have been no changes to how I obtain the epg file.
The problem is on my raspberry pi3 running raspbian and kodi 17. Up until today the guide.xml loaded without error. Today the guide xml will not load in tvguide fullscreen on the rapsberry pi and the kodi log shows the following error:

14:58:58.913 T:1365168896   ERROR:   File "/home/pi/.kodi/addons/script.tvguide.fullscreen/source.py", line 534, in _updateChannelAndProgramListCaches
14:58:58.920 T:1365168896   ERROR:     self.source.KEY, channel.weight, self.source.KEY])
14:58:58.921 T:1365168896   ERROR: ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
15:00:11.435 T:1340003072 WARNING: CSkinInfo: failed to load skin settings
15:00:12.026 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 7004
15:00:12.079 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 7100
15:00:12.093 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 4323
15:00:42.979 T:1348391680   ERROR: Traceback (most recent call last):
15:00:42.979 T:1348391680   ERROR:   File "/home/pi/.kodi/addons/script.tvguide.fullscreen/source.py", line 534, in _updateChannelAndProgramListCaches
15:00:42.984 T:1348391680   ERROR:     self.source.KEY, channel.weight, self.source.KEY])
15:00:42.984 T:1348391680   ERROR: ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.


The error seems to be complaining about the utf-8 encoding, however the guide.xml has always been created in utf-8 and and worked fine until today.

I tried loading the same guide.xml file into tvguide fullscreen running on a windows machine and it loads perfectly without error.

Here are the top few lines of my guide.xml:

<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version V2.1.5 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
  <channel id="BBC America ">
    <display-name lang="en">BBC America </display-name>
    <url>http://www.yo.tv</url>
  </channel>
  <channel id="E!">
    <display-name lang="en">E!</display-name>
    <url>http://www.yo.tv</url>
  </channel>


 Any guidance would be appreciated.

Thank you
 Usually there is a clue to the xmltv line and character number a bit lower in the kodi.log.
Some unicode in the channel id could cause problems. I've added an é in there before and it coped.
pm me a link to the xmltv file and I'll see if I can spot it. 
I KNEW you would have the answer Smile  - The problem was (as you figured) an ' above the E in RTÉ an Irish station. I thought it was always there, but I guess it is a recent change. Once I removed the ', the guide.xml loaded as expected.

Thank you for your work and your knowledge.


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - primaeval - 2018-04-10

(2018-04-09, 23:01)doktourtv Wrote:
(2018-04-09, 21:26)primaeval Wrote:
(2018-04-09, 21:20)doktourtv Wrote: Hello. I am suddenly having a problem that I cannot solve and I am sure it is not your program, however the error message you may be able to direct me to a solution.

I am using webgrab+ plus to create an the guide.xml as I have been for many years, without problems.

There have been no changes to how I obtain the epg file.
The problem is on my raspberry pi3 running raspbian and kodi 17. Up until today the guide.xml loaded without error. Today the guide xml will not load in tvguide fullscreen on the rapsberry pi and the kodi log shows the following error:

14:58:58.913 T:1365168896   ERROR:   File "/home/pi/.kodi/addons/script.tvguide.fullscreen/source.py", line 534, in _updateChannelAndProgramListCaches
14:58:58.920 T:1365168896   ERROR:     self.source.KEY, channel.weight, self.source.KEY])
14:58:58.921 T:1365168896   ERROR: ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
15:00:11.435 T:1340003072 WARNING: CSkinInfo: failed to load skin settings
15:00:12.026 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 7004
15:00:12.079 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 7100
15:00:12.093 T:1340003072   ERROR: EXCEPTION: Non-Existent Control 4323
15:00:42.979 T:1348391680   ERROR: Traceback (most recent call last):
15:00:42.979 T:1348391680   ERROR:   File "/home/pi/.kodi/addons/script.tvguide.fullscreen/source.py", line 534, in _updateChannelAndProgramListCaches
15:00:42.984 T:1348391680   ERROR:     self.source.KEY, channel.weight, self.source.KEY])
15:00:42.984 T:1348391680   ERROR: ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.


The error seems to be complaining about the utf-8 encoding, however the guide.xml has always been created in utf-8 and and worked fine until today.

I tried loading the same guide.xml file into tvguide fullscreen running on a windows machine and it loads perfectly without error.

Here are the top few lines of my guide.xml:

<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version V2.1.5 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
  <channel id="BBC America ">
    <display-name lang="en">BBC America </display-name>
    <url>http://www.yo.tv</url>
  </channel>
  <channel id="E!">
    <display-name lang="en">E!</display-name>
    <url>http://www.yo.tv</url>
  </channel>


 Any guidance would be appreciated.

Thank you
 Usually there is a clue to the xmltv line and character number a bit lower in the kodi.log.
Some unicode in the channel id could cause problems. I've added an é in there before and it coped.
pm me a link to the xmltv file and I'll see if I can spot it.    
I KNEW you would have the answer Smile  - The problem was (as you figured) an ' above the E in RTÉ an Irish station. I thought it was always there, but I guess it is a recent change. Once I removed the ', the guide.xml loaded as expected.

Thank you for your work and your knowledge.   
 Could you pm or post me your webgrab config files and xmltv.
I'd like to fix it if it is possible.
I tried changing BBC1 to BBC1é to recreate the problem but TVGF loads it ok (on Windows).
But if it is on raspbian I don't know how I'm going to test that.
Is there a virtual machine image of your version somewhere?

xml:
  <channel id="BBC1é">
    <display-name lang="en">BBC1é</display-name>
    <icon src="http://my.tvguide.co.uk/channel_logos/86.png" />
    <url>http://www.tvguide.co.uk</url>
  </channel>
  <programme start="20180410060000 +0100" stop="20180410091500 +0100" channel="BBC1é">
    <title lang="en">Breakfast</title>
    <sub-title lang="en">10/04/2018</sub-title>
    <desc lang="en">A round-up of national and international news, plus current affairs, arts and entertainment, and weather. Presented by Charlie Stayt and Louise Minchin</desc>
    <category lang="en">General Social</category>
    <category lang="en">Political Issues</category>
    <category lang="en">Economics</category>
    <icon src="http://i.yo.tv/tvguide_pictures/webANXbbcbreakfastgen.jpg" />
    <subtitles />
    <star-rating>
      <value>1.4/10</value>
    </star-rating>
  </programme>



RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - primaeval - 2018-04-10

version 0.0.386
- Settings\Source\Convert & to &amp;

This should fix the PS Vue incorrect xml problem.
@coremailrx8 could you check if it works.

It only works if the data source in Lab2 is the default setting of xmltv.


RE: TV Guide Fullscreen - possibly the most powerful TV Guide in the world. ;) - doktourtv - 2018-04-10

I have pmed you the requested files. I do not have the old guilde.xml with the error, as it was overwritten when I made the changes, however I did retain the offending entries in the webgrab config.

I think I mentioned it in the pm but the offending lines begin at line 199.

I am not sure if raspbian can be installed on a virtual machine, however, if you want me to test any changes to your addon on the raspberry pi3 running raspbian and kodi 17 (the latest that is available for raspberry pi), I will be happy to do that.