bugatsinho.github.io icon indicating copy to clipboard operation
bugatsinho.github.io copied to clipboard

[Skyline WebCams] A few issues here and there

Open pitsi opened this issue 1 year ago • 0 comments

After seeing the page on a friend's pc, I got jealous and decided to install the addon. And here are a few issues that I found

a) The "greek live cams" entry from the main menu does not work and pops this in the log.

2024-11-24 17:35:14.883 T:922     ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: 'bytes' object has no attribute 'encode'
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.skylinecctv/default.py", line 352, in <module>
                                                       get_greek_cams()
                                                     File "/storage/.kodi/addons/plugin.video.skylinecctv/default.py", line 102, in get_greek_cams
                                                       r = r.encode('utf-8')
                                                   AttributeError: 'bytes' object has no attribute 'encode'
                                                   -->End of Python script error report<--

b) Setting the language to greek in the settings makes the addon fail to launch afterwards. I had to completely delete ~/.kodi/userdata/addon_data/plugin.video.skylinecctv/ to make it work again! It does not happen with any other language. Log output

2024-11-24 17:36:33.089 T:968     ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'Ελληνικά'
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.skylinecctv/default.py", line 50, in <module>
                                                       web_lang = get_lang()
                                                     File "/storage/.kodi/addons/plugin.video.skylinecctv/default.py", line 47, in get_lang
                                                       return lang_dict[lang]
                                                   KeyError: 'Ελληνικά'
                                                   -->End of Python script error report<--

c) On python2 (kodi 18), most entries from the main menu fail to start with the following error

2024-11-24 17:42:18.884 T:140491626620672   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'\u2019' in position 69: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.skylinecctv/default.py", line 346, in <module>
                                                get_content(url)
                                              File "/storage/.kodi/addons/plugin.video.skylinecctv/default.py", line 199, in get_content
                                                desc = desc.decode('ascii', errors='ignore')
                                            UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 69: ordinal not in range(128)
                                            -->End of Python script error report<--

d) Last but not least, the menu entry "live cams by category" returns nothing. This applies to both python2 and python3.

Thank you in advance.

pitsi avatar Nov 24 '24 15:11 pitsi