moreginger / xbmc-plugin.video.ted.talks

GNU General Public License v2.0
18 stars 20 forks source link

Launching a video does not work #85

Open court-jus opened 6 months ago

court-jus commented 6 months ago

I can browse videos but when I try to launch one, there is an error that refers to the log.

Here is the extract from the log that seem relevant:

2024-04-16 09:08:43.512 T:16564   debug <general>: [ADDON] TED Talks v5.0.0 - url = https://www.ted.com/talks/tunde_olaniran_music_movement_and_poetry?rss=172BB350-0205
2024-04-16 09:08:43.528 T:16564   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
 - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'UnicodeDecodeError'>
Error Contents: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/xbian/.kodi/addons/plugin.video.ted.talks/default.py", line 14, in <module>
    ted_talks.Main(args_map=args_map).run()
  File "/home/xbian/.kodi/addons/plugin.video.ted.talks/resources/lib/ted_talks.py", line 336, in run
    modes[mode].run(self.args_map)
  File "/home/xbian/.kodi/addons/plugin.video.ted.talks/resources/lib/ted_talks.py", line 148, in run
    self.run_internal(args)
  File "/home/xbian/.kodi/addons/plugin.video.ted.talks/resources/lib/ted_talks.py", line 166, in run_internal
    self.ui.playVideo(args['url'], args['icon'] if 'icon' in args else None)
  File "/home/xbian/.kodi/addons/plugin.video.ted.talks/resources/lib/ted_talks.py", line 70, in playVideo
    subs_language = settings.get_subtitle_languages()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xbian/.kodi/addons/plugin.video.ted.talks/resources/lib/settings.py", line 38, in get_subtitle_languages
    code = language_mapping.get_language_code(xbmc_language)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xbian/.kodi/addons/plugin.video.ted.talks/resources/lib/model/language_mapping.py", line 18, in get_language_code
    for line in f:
  File "/usr/lib/python3.11/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
-->End of Python script error report<--