voc / plugin.video.media-ccc-de

Kodi plugin for https://media.ccc.de/
Other
43 stars 4 forks source link

argument "heading" for method "notification" must be unicode or str #11

Closed markuslindenberg closed 7 years ago

markuslindenberg commented 8 years ago

notification(...) is called with a tuple (heading, message) instead of two separate arguments (API). This prevents the error message from being displayed and shows a generic error instead.

The issue is trivial to fix, should I send a pull request?

(I found this because the current CA for https://streaming.media.ccc.de/ doesn't verify in LibreELEC v7.90.003 so live streaming is broken there)

20:46:25 2238.430420 T:1572189088   ERROR: EXCEPTION: argument "heading" for method "notification" must be unicode or str
20:46:25 2238.434570 T:1572189088   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: argument "heading" for method "notification" must be unicode or str
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.media-ccc-de/addon.py", line 193, in <module>
                                                plugin.run()
                                              File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 109, in run
                                                self._dispatch(path)
                                              File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 120, in _dispatch
                                                view_func(**kwargs)
                                              File "/storage/.kodi/addons/plugin.video.media-ccc-de/addon.py", line 124, in show_live
                                                data = http.fetch_live()
                                              File "/storage/.kodi/addons/plugin.video.media-ccc-de/resources/lib/http.py", line 49, in fetch_live
                                                xbmcgui.Dialog().notification(err, xbmcgui.NOTIFICATION_ERROR, 15000)
                                            TypeError: argument "heading" for method "notification" must be unicode or str
                                            -->End of Python script error report<--
TobiX commented 7 years ago

Thanks for the info, I fixed the call. Is the certificate error maybe releated to #2?

markuslindenberg commented 7 years ago

Initially, no. I talked to the VOC people while debugging this and it turned out LibreELEC doesn't ship the WoSign_China CA that was used on https://streaming.media.ccc.de/

That was a well known problem (affecting Apple, Qt5, LibreELEC) and VOC was planning to switch to LE certificates so they promptly replaced the certificates.

After that, the Plugin was able to load the .json metadata but still I got TLS handshake errors from ffmpeg when it tried to load the m3u8 HLS playlist. I gave up at that point and built a playlist with unencrypted http links to the streams.