cvarelaruiz / owi2plex

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

KeyError: 'picon' #39

Open ManuGH opened 1 year ago

ManuGH commented 1 year ago

Traceback (most recent call last): File "/usr/bin/owi2plex", line 8, in sys.exit(main()) File "/usr/lib/python3.8/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/lib/python3.8/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/lib/python3.8/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3.8/site-packages/click/core.py", line 555, in invoke return callback(args, **kwargs) File "/usr/bin/owi2plex.py", line 381, in main xmltv = generateXMLTV(bouquets_services, epg, api_root_url, tzoffset) File "/usr/bin/owi2plex.py", line 348, in generateXMLTV xmltv = addChannels2XML(xmltv, bouquets_services, epg, api_root_url) File "/usr/bin/owi2plex.py", line 166, in addChannels2XML channel_picon.attrib['src'] = '{}{}'.format(api_root_url, first_event['picon']) KeyError: 'picon'

ahrendt commented 1 year ago

Same here. Since updating the image, which is now working with OpenWebIF 2.0.1, I also get these errors.

No XML file is produced...

MaikLieb commented 1 year ago

I have the same problem. It seems to be due to channels that no longer exist.

This is ok: [{'id': 17092, 'sref': '1:0:19:93:2:85:21:0:0.... This makes the error: [{'sref': '1:0:19:80:B:85:21:0:...

I add one line for check the id to the owi2plex.py. now it works for me.

Line 174 if 'id' in first_event: channel_picon = etree.SubElement(channel, 'icon') channel_picon.attrib['src'] = '{}{}'.format(api_root_url, first_event['picon'])

ManuGH commented 1 year ago

How to change this on unRaid?