sualfred / script.embuary.helper

Helper script for Embuary Kodi skin
17 stars 13 forks source link

getitemsbyactor fails if query contains unicode characters #46

Closed roidy closed 3 years ago

roidy commented 3 years ago

Calling getitemsbyactor fails if the query string contains unicode characters

2020-10-17 18:01:32.010 T:3922719616   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/script.embuary.helper/plugin.py", line 76, in <module>
                                                Main()
                                              File "/storage/.kodi/addons/script.embuary.helper/plugin.py", line 27, in __init__
                                                self.getinfos()
                                              File "/storage/.kodi/addons/script.embuary.helper/plugin.py", line 60, in getinfos
                                                self._execute(plugin,self.info)
                                              File "/storage/.kodi/addons/script.embuary.helper/plugin.py", line 68, in _execute
                                                getattr(plugin,action.lower())()
                                              File "/storage/.kodi/addons/script.embuary.helper/resources/lib/plugin_content.py", line 810, in getitemsbyactor
                                                plugin_category = ADDON.getLocalizedString(32030) + ' ' + actor
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)
                                            -->End of Python script error report<--
2020-10-17 18:01:32.309 T:3867976576   ERROR: GetDirectory - Error getting plugin://script.embuary.helper/?info=getitemsbyactor&label='"Synnøve Macody Lund"'

This is under Kodi 18.8 and Embuary helper version 1.4.8

sualfred commented 3 years ago

Fixed with https://github.com/sualfred/script.embuary.helper/commit/8dd600d8749217ac58f830fc5f1d21e3e4539b31