plugin.video.elementum icon indicating copy to clipboard operation
plugin.video.elementum copied to clipboard

Error: No module named 'six.moves'

Open Pejda opened this issue 9 months ago • 4 comments

Current Behavior

After a update the addon stopped working. It crashes on start.

Steps to Reproduce (for bugs)

  1. Open Kodi
  2. Error shows up immediately after opening Kodi

Context

I have found this in crash log: 2024-04-30 18:39:27.254 T:6208 error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'ModuleNotFoundError'> Error Contents: No module named 'six.moves' Traceback (most recent call last): File "/home/pejda/.kodi/addons/plugin.video.elementum/service.py", line 4, in <module> from elementum import service, config File "/home/pejda/.kodi/addons/plugin.video.elementum/resources/site-packages/elementum/service.py", line 4, in <module> from elementum.rpc import server_thread File "/home/pejda/.kodi/addons/plugin.video.elementum/resources/site-packages/elementum/rpc.py", line 11, in <module> from six.moves import urllib_request ModuleNotFoundError: No module named 'six.moves' -->End of Python script error report<--

I have checked and have 'six.moves' installed on system.

Your Environment

  • Version used: 0.1.102
  • Environment name and version: 21.0 (21.0.0)
  • Operating System and version: Linux 6.8.8-2-cachyos

kodi_crashlog-20240430_184032.log

Pejda avatar Apr 30 '24 17:04 Pejda

I have the same error (

bfoot avatar Apr 30 '24 17:04 bfoot

After update of Kodi or update of the addon? Addon was not changing anything about that module.

elgatito avatar Apr 30 '24 17:04 elgatito

After update of Kodi or update of the addon? Addon was not changing anything about that module.

Clean installation on Archlinux. Kodi 21, sim.moves module not found. Python six and six_kodi installed.

bfoot avatar Apr 30 '24 17:04 bfoot

After update of Kodi or update of the addon? Addon was not changing anything about that module.

Good point. I have updated both recently, so not entirely sure. It is possible that there is some incompatibility with recent version of kodi.

Pejda avatar Apr 30 '24 18:04 Pejda

Same issue here.

However, I am unable to connect to any stream via any Kodi addon presently (The Crew, etc), so I am wondering whether it is a Kodi bug.

casablancaboy avatar May 03 '24 14:05 casablancaboy

Same problem after instaling Enigma 2 OPENATV 7.3 (linux and python 3) clean from scratch and after instaling KODI 21 (OMEGA) extension (on vuplus ZERo 4k with an arm v7 processor), i had installed the lementum.org repo and then install elementum.video addon and in the logs have the same error.

ruipisco avatar May 04 '24 13:05 ruipisco

Error persists, even after most recent Kodi update.

casablancaboy avatar May 08 '24 05:05 casablancaboy

@Pejda @bfoot @casablancaboy @ruipisco

so this is a bit weird issue, looks like it happened after arch linux folks decided to use python 3.12 in their build of Kodi. see https://gitlab.archlinux.org/archlinux/packaging/packages/kodi/-/commit/0e09a063fd59d070e7fbdb8e72844a70ca9f7709

and elementum used local and old copy of six module. so maybe that old version was incompatible with python 3.12.

and maybe using of "latest" (code of latest version 1.16.0 is 3 years old) version of script.module.six will help you.

possible fix: download appropriate zip from https://github.com/elgatito/plugin.video.elementum/releases/tag/v0.1.102 and do these changes https://github.com/elgatito/plugin.video.elementum/pull/1036/files in zip file and then install it or use my build plugin.video.elementum-v0.1.102-4-g0fe6251.linux_x64.zip then please write here if it helped or not.

if this fix will not help then maybe you should create an issue for script.module.six itself.


jfyi: there is official Flatpak version of Kodi. I just have tested it - it works fine. can be used as a backup plan if we fail to fix an easy solution for this issue.

antonsoroko avatar May 08 '24 13:05 antonsoroko

@antonsoroko Right now I found this issue: https://github.com/dpkp/kafka-python/issues/2401 , it looks like the same we have, Elementum has older version of six module, so maybe it would help with newer six.

elgatito avatar May 08 '24 13:05 elgatito

@Pejda @bfoot @casablancaboy @ruipisco

so this is a bit weird issue, looks like it happened after arch linux folks decided to use python 3.12 in their build of Kodi. see https://gitlab.archlinux.org/archlinux/packaging/packages/kodi/-/commit/0e09a063fd59d070e7fbdb8e72844a70ca9f7709

and elementum used local and old copy of six module. so maybe that old version was incompatible with python 3.12.

and maybe using of "latest" (code of latest version 1.16.0 is 3 years old) version of script.module.six will help you.

possible fix: download appropriate zip from https://github.com/elgatito/plugin.video.elementum/releases/tag/v0.1.102 and do these changes https://github.com/elgatito/plugin.video.elementum/pull/1036/files in zip file and then install it or use my build plugin.video.elementum-v0.1.102-4-g0fe6251.linux_x64.zip then please write here if it helped or not.

if this fix will not help then maybe you should create an issue for script.module.six itself.

jfyi: there is official Flatpak version of Kodi. I just have tested it - it works fine. can be used as a backup plan if we fail to fix an easy solution for this issue.

Thank you. Tried possible fix, elementum loaded, but I was not able to find any sources to watch. There are errors in log. kodi.log

Pejda avatar May 08 '24 21:05 Pejda

failed with NameError("name 'PROTOCOL_SSLv23' is not defined"):

That's something new :-) And this is from Burst, not Elementum. So, at least fix is working.

antonsoroko avatar May 08 '24 21:05 antonsoroko

@elgatito https://github.com/search?q=repo%3Aelgatito%2Fscript.elementum.burst%20PROTOCOL_SSLv23&type=code

So I guess burst's copy of urllib3 also should be updated. But at some point they dropped support of python 2 (old Kodies) so we need to find some intermediate solution for new and old Kodi.

antonsoroko avatar May 08 '24 21:05 antonsoroko

failed with NameError("name 'PROTOCOL_SSLv23' is not defined"):

That's something new :-) And this is from Burst, not Elementum. So, at least fix is working.

The same error. After install your plugin, Elementum work, but don't find any sources to watch.

bfoot avatar May 09 '24 05:05 bfoot

@Pejda @bfoot @casablancaboy @ruipisco

try this build of burst https://github.com/antonsoroko/script.elementum.burst/archive/refs/heads/update-urllib3-1.26.18.zip (with build of elementum from above, of course)

I updated urllib3 to 1.26.18 which is the last version that supports both python 3 and 2 (but this version is not the latest, version 2.x is latest but supports only python 3).

If it fail - please follow https://elementum.surge.sh/contribute/log/ to create debug log (logs above do not have debug level messages).

just imho: if this fix helps - good. if not - i think it would be easier to use kodi from flatpak. b/c to support python 3.12 and python 2 we would need to have 2 different versions of code. and arch linux is the only distro that compiled kodi with 3.12. other linux disctros and OSes uses "stable" python versions to compile kodi. and by the time 3.12 will become "mainstream" - we simply can drop support of python 2. but it is up to elgatito to make a final decision.

antonsoroko avatar May 09 '24 11:05 antonsoroko

@Pejda @bfoot @casablancaboy @ruipisco

try this build of burst https://github.com/antonsoroko/script.elementum.burst/archive/refs/heads/update-urllib3-1.26.18.zip (with build of elementum from above, of course)

I updated urllib3 to 1.26.18 which is the last (but not the latest) version that supports both python 3 and 2.

If it fail - please follow https://elementum.surge.sh/contribute/log/ to create debug log (logs above does not have debug level logs).

just imho: if this fix helps - good. if not - i think it would be easier to use kodi from flatpak. b/c to support python 3.12 and python 2 we would need to have 2 different versions of code. and arch linux is the only distro that compiled kodi with 3.12. other linux disctros and OSes uses "stable" python versions to compile kodi. and by the time 3.12 will become "mainstream" - we simply can drop support of python 2. but it is up to elgatito to make a final decision.

Work fine !!! Thank you !!!!!

bfoot avatar May 09 '24 14:05 bfoot

@Pejda @bfoot @casablancaboy @ruipisco

try this build of burst https://github.com/antonsoroko/script.elementum.burst/archive/refs/heads/update-urllib3-1.26.18.zip (with build of elementum from above, of course)

I updated urllib3 to 1.26.18 which is the last version that supports both python 3 and 2 (but this version is not the latest, version 2.x is latest but supports only python 3).

If it fail - please follow https://elementum.surge.sh/contribute/log/ to create debug log (logs above do not have debug level messages).

just imho: if this fix helps - good. if not - i think it would be easier to use kodi from flatpak. b/c to support python 3.12 and python 2 we would need to have 2 different versions of code. and arch linux is the only distro that compiled kodi with 3.12. other linux disctros and OSes uses "stable" python versions to compile kodi. and by the time 3.12 will become "mainstream" - we simply can drop support of python 2. but it is up to elgatito to make a final decision.

It works fine now on OPENATV 7.4 with python 3, on arm v7 processor! @elgatito should now decide to leave python 2 support for older distros. Thank you @bfoot !

ruipisco avatar May 09 '24 17:05 ruipisco

Elementum was updated to v0.1.103, containing the fix for Python 3.12.

elgatito avatar May 10 '24 09:05 elgatito

@elgatito you need to update the urllib on eleentum.bust package too to work fine, like the build t https://github.com/antonsoroko/script.elementum.burst/archive/refs/heads/update-urllib3-1.26.18.zip that @bfoot as shared! Updating only elementum addon does not allow to burst to work and throwback active provider results.

ruipisco avatar May 10 '24 13:05 ruipisco

@Pejda @bfoot @casablancaboy @ruipisco Burst 0.0.88 was released 2 days ago. Please install it and test.

antonsoroko avatar May 12 '24 10:05 antonsoroko

Tried updating elementum and burst. Also fresh install of cachyos, kodi, elementum and burst on another device. In both cases everything seem to be working. Thank you, guys!

Pejda avatar May 12 '24 17:05 Pejda

btw, today i updated to kubuntu 24.04 and surprisingly it also uses python 3.12 but they have kodi 20.5. as i can see debian still uses 3.11 (in stable/testing/unstable releases, e.g. https://packages.debian.org/trixie/kodi-bin )

but because of python 3.12 kodi is broken in ubuntu 24.04 if you use some addons, see https://bugs.launchpad.net/ubuntu/+source/kodi/+bug/2063358 looks like kodi team already fixed that issue, but ubuntu team have not incorporated the fix yet.

so, i would say that flatpak version look more and more attractive, so far it works in any linux distro.

antonsoroko avatar May 12 '24 18:05 antonsoroko