cvarelaruiz / owi2plex

Exporter of EPG from OpenWebif to XMLTV to use with Plex
Mozilla Public License 2.0
27 stars 6 forks source link

Not creating xml, stops with this error #6

Closed djakupovic closed 5 years ago

djakupovic commented 5 years ago

Getting EPG for Service 126.INSIGHT TV UHD (2000) from http://192.168.1.30:80/api/epgservice?sRef=1:0:1F:7D0:449:1:C00000:0:0:0: Getting EPG for Service 127.QVC UHD (4230) from http://192.168.1.30:80/api/epgservice?sRef=1:0:1F:1086:3EE:1:C00000:0:0:0: Getting EPG for Service 128.Travelxp 4k (6202) from http://192.168.1.30:80/api/epgservice?sRef=1:0:1F:183A:40B:1:C00000:0:0:0: Getting EPG for Service 129.Fashion 4K (12510) from http://192.168.1.30:80/api/epgservice?sRef=1:0:1F:30DE:413:1:C00000:0:0:0: Getting EPG for Service 130.UHD1 by ASTRA / HD+ (2) from http://192.168.1.30:80/api/epgservice?sRef=1:0:1F:2:40B:1:C00000:0:0:0: Traceback (most recent call last): File "/usr/local/bin/owi2plex", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(args, **kwargs) File "/usr/local/bin/owi2plex.py", line 369, in main tzoffset = getOffset(api_root_url=api_root_url) File "/usr/local/bin/owi2plex.py", line 128, in getOffset now = datetime.timestamp(datetime.now()) AttributeError: type object 'datetime.datetime' has no attribute 'timestamp'

dhlsam commented 5 years ago

same

Traceback (most recent call last): File "/bin/owi2plex", line 10, in sys.exit(main()) File "/usr/lib/python2.7/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/lib/python2.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/lib/python2.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python2.7/site-packages/click/core.py", line 555, in invoke return callback(args, **kwargs) File "/usr/bin/owi2plex.py", line 369, in main tzoffset = getOffset(api_root_url=api_root_url) File "/usr/bin/owi2plex.py", line 128, in getOffset now = datetime.timestamp(datetime.now()) AttributeError: type object 'datetime.datetime' has no attribute 'timestamp'

Fuechslein commented 5 years ago

Try with Python3. That's what fixed it for me.

grundholm commented 5 years ago

I just installed Linux Mint and here is what I did: sudo apt-get update sudo apt-get install python3.7 sudo apt install python3-pip pip3 install --upgrade setuptools sudo pip3 install owi2plex

and to get the xml file: sudo owi2plex -b "Plex" -h "192.168.0.150" -o /tmp/epg.xml

and Boom! :-)

djakupovic commented 5 years ago

python 3.6 solved it

jeromim commented 5 years ago

I just installed Linux Mint and here is what I did: sudo apt-get update sudo apt-get install python3.7 sudo apt install python3-pip pip3 install --upgrade setuptools sudo pip3 install owi2plex

and to get the xml file: sudo owi2plex -b "Plex" -h "192.168.0.150" -o /tmp/epg.xml

and Boom! :-)

root@Desktop:/# owi2plex -b "Variedades" -h 192.168.1.100 -P 1080 -u root -p dreambox -o /mnt/f/epg.xml b'Getting EPG for Service 1.Arte 1 (130) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:82:34:1:B54AF58:0:0:0:' b'Getting EPG for Service 2.BIS (144) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:90:4:1:B54B020:0:0:0:' b'Getting EPG for Service 3.Comedy Central (92) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:5C:32:1:B543124:0:0:0:' b'Getting EPG for Service 4.Curta! (159) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:9F:32:1:B543124:0:0:0:' b'Getting EPG for Service 5.E! (54) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:36:32:1:B543124:0:0:0:' b'Getting EPG for Service 6.Fish TV (52) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:34:2:1:B54314C:0:0:0:' b'Getting EPG for Service 7.Food Network (35) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:23:1:1:B542FBC:0:0:0:' b'Getting EPG for Service 8.GNT (41) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:29:2:1:B54314C:0:0:0:' b'Getting EPG for Service 9.Lifetime (79) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:4F:4:1:B54B020:0:0:0:' b'Getting EPG for Service 10.Mais Globosat (131) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:83:4:1:B54B020:0:0:0:' b'Getting EPG for Service 11.NHK (156) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:9C:2:1:B54314C:0:0:0:' b'Getting EPG for Service 12.Play TV (118) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:76:33:1:B543174:0:0:0:' b'Getting EPG for Service 13.Polishop TV (176) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:B0:2:1:B54314C:0:0:0:' b'Getting EPG for Service 14.TruTV (88) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:58:1:1:B542FBC:0:0:0:' b'Getting EPG for Service 15.TLC (124) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:7C:36:1:B5430D4:0:0:0:' b'Getting EPG for Service 16.SIC Internacional (150) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:96:33:1:B543174:0:0:0:' b'Getting EPG for Service 17.ZooMoo (153) from http://root:dreambox@192.168.1.100:1080/api/epgservice?sRef=1:0:1:99:1:1:B542FBC:0:0:0:' Setting TZ Offset from UTC to -0300 Generating XMLTV payload. Traceback (most recent call last): File "/usr/local/bin/owi2plex", line 11, in sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 555, in invoke return callback(args, **kwargs) File "/usr/local/bin/owi2plex.py", line 370, in main xmltv = generateXMLTV(bouquets_services, epg, api_root_url, tzoffset) File "/usr/local/bin/owi2plex.py", line 338, in generateXMLTV xmltv = addEvents2XML(xmltv, epg, tzoffset) File "/usr/local/bin/owi2plex.py", line 313, in addEvents2XML programme_title.text = title File "src/lxml/etree.pyx", line 1018, in lxml.etree._Element.text.set File "src/lxml/apihelpers.pxi", line 710, in lxml.etree._setNodeText File "src/lxml/apihelpers.pxi", line 698, in lxml.etree._createTextNode File "src/lxml/apihelpers.pxi", line 1493, in lxml.etree._utf8 ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters root@Desktop:/# owi2plex -b "Variedades" -h 192.168.1.100 -P 1080 -u root -p dreambox -o /mnt/f/epg.xml

grundholm commented 5 years ago

Try with sudo owi2plex .... and use "" around IP number, port, username and password Make a Bouquet with just one or two channels for your tests Make sure to update pip3 setuptools Check folder permissions

jeromim commented 5 years ago

Try with sudo owi2plex .... and use "" around IP number, port, username and password Make a Bouquet with just one or two channels for your tests Make sure to update pip3 setuptools Check folder permissions

It worked with 2 channels in the bouquet, I need all the channels, would I have some way to fix this problem? if you can not extract all the function of this script? Thank you for your help

grundholm commented 5 years ago

Try to add more channels, one or two, maybe one of the channels don't have valid EPG data - Unicode, ASCII or contains a NULL and the parser can't insert the value into the xml document.

jeromim commented 5 years ago

Try to add more channels, one or two, maybe one of the channels don't have valid EPG data - Unicode, ASCII or contains a NULL and the parser can't insert the value into the xml document.

with one or two channels works, the problem is that one of the channels does not have EPG, would not it be possible to fix the program for when the channel does not have EPG to ignore instead of giving error?