raptor2101 / Mediathek

GNU General Public License v3.0
45 stars 16 forks source link

update to python 3 required #116

Closed riker65 closed 4 years ago

riker65 commented 4 years ago

Hi I am having

2020-02-26 14:03:21.371 T:4906   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'ImportError'>
                                            Error Contents: No module named 'urllib2'
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/plugin.video.zdf_de_lite/default.py", line 2, in <module>
                                                import libzdf
                                              File "/home/osmc/.kodi/addons/script.module.libzdf/lib/libzdf.py", line 4, in <module>
                                                import libmediathek3 as libMediathek
                                              File "/home/osmc/.kodi/addons/script.module.libmediathek3/lib/libmediathek3.py", line 9, in <module>
                                                from libmediathek3utils import *
                                              File "/home/osmc/.kodi/addons/script.module.libmediathek3/lib/libmediathek3utils.py", line 3, in <module>
                                                import urllib2
                                            ImportError: No module named 'urllib2'
                                            -->End of Python script error report<--
sebastianwagner commented 4 years ago

@riker65 Your backtrace looks like it happened within an other plugin: https://github.com/xbmc/repo-plugins/tree/krypton/plugin.video.zdf_de_lite You might want to talk to sarbes who seems to be working on all the other *mediathek plugins.

I for my part will try to push forward the preparations towards python3 from #115 for the plugin.video.mediathek maintained here as soon as debian ships the kodi version leia or any python3 compatible version.

Could you elaborate regarding urllib2 and python3 and how you come to the conclusion about python3 needed for osmc? (as far as i know osmc is still leia, thus compatible to python2)

riker65 commented 4 years ago

Hi, I tried kodi 19 upgraded to python3 now

riker65 commented 4 years ago

https://discourse.osmc.tv/t/kodi-19-matrix-nightly-builds-for-raspberry-pi/79407/171

sebastianwagner commented 4 years ago

@riker65 You meight want to test xbmc/repo-plugins#2729 but that PR is blocked until we shrink default.py.

WARN: Complex entry point. Check: default.py | Counted lines: 85 | Lines allowed: 15

raptor2101 commented 4 years ago

@sebastianwagner i'am currently working on this issue...

raptor2101 commented 4 years ago

@riker65 @sebastianwagner i took the "long way" and changed the code manually to be python3 compatible.

i'am currently wrapping the default.py to get the whole thing < 15 lines...

raptor2101 commented 4 years ago

ok moving completed. Please make a test for the new version. After this i will prepare a pull request.

i'am aware that 3SAT and KIKA seems to have a layout change that i have to adopt later ... i would like to seperate this in two PRs...

sebastianwagner commented 4 years ago

i abandoned the PRs #115 and xbmc/repo-plugins#2729 accordingly.

raptor2101 commented 4 years ago

Plugin got rejected finaly