nixgates / plugin.video.seren

Repository for Seren Development
313 stars 95 forks source link

[BUG] Python version on some Linux releases #861

Closed werrent closed 1 year ago

werrent commented 1 year ago

Seren worked yesterday. Today, I get errors every time I try to run it. It does not run. Instead I get a message that there was a Seren error, and to check the log. This seems to be the related message from the log.

2022-12-23 18:23:10.133 T:7066 INFO : initializing python engine. 2022-12-23 18:23:10.264 T:7066 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

2022-12-23 18:23:10.401 T:7066 INFO : Python interpreter stopped 2022-12-23 18:23:10.414 T:7064 ERROR : GetDirectory - Error getting plugin://plugin.video.seren/ 2022-12-23 18:23:10.417 T:4145 ERROR : CGUIMediaWindow::GetDirectory(plugin://plugin.video.seren/) failed

I am running Kodi 19.4.0

Ubuntu 18.04

Any advice?

nixgates commented 1 year ago

This is an issue with the fact that Kodi uses the native python package on Linux instead of packing in its own copy to ensure version matching.

Its stupid as hell.

I believe the easiest fix is to upgrade your version of ubuntu. This should come bundled with python 3 natively and then everything should just work.

If you're not up to updating ubuntu for whatever reason, I believe there's another workaround. I didn't find it so ill have to get a hold of it for you.

nixgates commented 1 year ago

@werrent upgrading the system packaged python looks to be a bit of an undertaking.

My honest suggestion is to update your ubuntu version. Follow the link below for some help on how to do that:

https://ubuntu.com/blog/how-to-upgrade-from-ubuntu-18-04-lts-to-20-04-lts-today

Edit: be sure to upgrade to 20 and not 22 as well.

22 packages python 3.10 which has a few issues and its best to avoid.

werrent commented 1 year ago

Thanks for the reply Upgrading from 18.04 is on my to-do list. When I finally get that done, I will give Seren another try.

werrent commented 1 year ago

The add-on worked yesterday, but not today. Is there any chance that a new version was auto-installed? The line in question uses a walrus operator, which is a Python 3.8 feature. In 18.0.4 the Python3 version is 3.6.9. This code should have been raising errors every day. If there was a new version installed today, would there be a way to find and re-install the previous version of the add-on? Hrmm, I suppose that I might find the answer easily enough if I explore the version history right here on this site.

nixgates commented 1 year ago

The add-on worked yesterday, but not today. Is there any chance that a new version was auto-installed? The line in question uses a walrus operator, which is a Python 3.8 feature. In 18.0.4 the Python3 version is 3.6.9. This code should have been raising errors every day. If there was a new version installed today, would there be a way to find and re-install the previous version of the add-on? Hrmm, I suppose that I might find the answer easily enough if I explore the version history right here on this site.

Definetely sounds like it auto updated through kodi it seems.

In version 3.0 we dropped Leia support and targeted matrix which is supposed to be 3.8.

You definetely can just roll back to the last version 2 release in the interim if you'd like though, you may find some other packages have updated as well and might cause some further issues.

Best to backup your .kodi folder.

Edit: Do make sure to update soon though as 18 reaches end of support in April. Don't want to get caught out!

werrent commented 1 year ago

I still have version 2.2.4 on my laptop, and it works. version 3.0.0 is where I am having the problem.

I hacked around a bit, and somehow reverted to 2.1.9 (I think). It seems to work. I should be okay until I upgrade Ubuntu

thanks for your help

nixgates commented 1 year ago

No problem, thankfully we have identified this issue previously and are aware of it.

Hopefully this bug report will help others as well!