Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fdy opened this issue Apr 7, 2020 · 1 comment

Comments

@fdy
Copy link

fdy commented Apr 7, 2020

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)

@Dobi-Dev
Copy link

Dobi-Dev commented May 9, 2020

I think I have fixed this issue in this pull request : #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants