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

Errors/Exceptions thrown on unicode fail with UnicodeEncodeError #852

Open
Twilight0 opened this issue Jul 30, 2020 · 2 comments
Open

Errors/Exceptions thrown on unicode fail with UnicodeEncodeError #852

Twilight0 opened this issue Jul 30, 2020 · 2 comments

Comments

@Twilight0
Copy link
Contributor

This unavailable video for instance: https://www.youtube.com/watch?v=ZkfwvNISQn4

Produces this error, as taken from debug log:

2020-07-30 12:44:50.748 T:139643032413952   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 characters in position 0-1: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "/home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/default.py", line 15, in <module>
                                                runner.run(__provider__)
                                              File "/home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/runner.py", line 60, in run
                                                __RUNNER__.run(provider, context)
                                              File "/home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/impl/xbmc/xbmc_runner.py", line 33, in run
                                                results = provider.navigate(context)
                                              File "/home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/abstract_provider.py", line 100, in navigate
                                                result = method(context, re_match)
                                              File "/home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/register_provider_path.py", line 19, in wrapper
                                                return func(*args, **kwargs)
                                              File "/home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/provider.py", line 763, in on_play
                                                return yt_play.play_video(self, context)
                                              File "/home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/yt_play.py", line 52, in play_video
                                                context.get_ui().show_notification(message=e.get_message())
                                              File "/home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/impl/xbmc/xbmc_context_ui.py", line 129, in show_notification
                                                _message = utils.to_utf8(message.decode('unicode-escape'))
                                            UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
                                            -->End of Python script error report<--
2020-07-30 12:44:50.748 T:139643032413952   DEBUG: onExecutionDone(6, /home/twilight/.kodi/addons/plugin.video.youtube/resources/lib/default.py)
2020-07-30 12:44:50.763 T:139645346437824   DEBUG: ------ Window Init (DialogNotification.xml) ------
2020-07-30 12:44:50.776 T:139643032413952    INFO: Python interpreter stopped
2020-07-30 12:44:50.776 T:139643032413952    INFO: Previous line repeats 2 times.
2020-07-30 12:44:50.776 T:139643032413952   DEBUG: Thread LanguageInvoker 139643032413952 terminating
2020-07-30 12:44:50.788 T:139643068606208   DEBUG: Thread scriptobs 139643068606208 terminating
2020-07-30 12:44:50.811 T:139645346437824   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
2020-07-30 12:44:50.811 T:139645346437824   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtube/play/?addon_id=plugin.video.AliveGR&video_id=ZkfwvNISQn4]

Platform: Linux Mint 20 (Ubuntu 20.04)
Kodi 18.8
Youtube addon 6.8.3

@anxdpanic
Copy link
Collaborator

#853 should fix it 👍

@eschwarz2411
Copy link

kodi.log
Seeems to me that the script for assigning the Google user to the youtube app has the same problem.

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

3 participants