plugin.video.iptv.recorder icon indicating copy to clipboard operation
plugin.video.iptv.recorder copied to clipboard

Special characters not handled properly in channel name and TV program name

Open fdy opened this issue 4 years ago • 1 comments

When launching a record with a channel name or a TV program name that has special characters (%... in the /record_epg/... URL), it leads to a Python script error. Here is the kodi.log: 2020-04-07 21:48:04.103 T:10591 DEBUG: [xbmcswift2] Handling incoming request for /record_epg/LCP+Assembl%C3%A9e+Nationale/D%C3%A9batDoc/2020-04-07 21:30:00/2020-04-07 22:00:00 2020-04-07 21:48:04.104 T:10591 NOTICE: [xbmcswift2] Request for "/record_epg/LCP+Assembl%C3%A9e+Nationale/D%C3%A9batDoc/2020-04-07 21:30:00/2020-04-07 22:00:00" matches rule for function "record_epg" 2020-04-07 21:48:04.115 T:10591 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.UnicodeEncodeError'> Error Contents: 'ascii' codec can't encode character u'\xe9' in position 11: ordinal not in range(128) Traceback (most recent call last): File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.iptv.recorder/main.py", line 3484, in plugin.run() File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 345, in run items = self._dispatch(self.request.path) File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 319, in _dispatch listitems = view_func(**items) File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.iptv.recorder/main.py", line 548, in record_epg log("Scheduling record for '{}: {} ({} to {})'".format(channelname, name, start, stop)) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 11: ordinal not in range(128) -->End of Python script error report<-- 2020-04-07 21:48:04.115 T:10591 DEBUG: onExecutionDone(5, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.iptv.recorder/main.py)

fdy avatar Apr 07 '20 19:04 fdy

I think I have fixed this issue in this pull request : https://github.com/primaeval/plugin.video.iptv.recorder/pull/39

Dobi-Dev avatar May 09 '20 16:05 Dobi-Dev