This appears to be https://github.com/xbmc/xbmc/issues/24069
Python seems to be enforcing this behavior since early in the 3.12
cycle: https://docs.python.org/3/whatsnew/changelog.html#id141
Locally, I applied the commit linked from that bug report:
https://github.com/xbmc/xbmc/commit/4bf9de87e700f0de56ef698a8d8d6eb7d4ff9050
It applied and built clean and I haven't had the issue since.
(Admittedly only a few hours, but as Harri noted, it happened almost
immediately before.)
Anyway, thanks for maintaining this. Cheers!
Dylan
On Fri, 28 Jun 2024 18:31:42 +0200 Harald Dunkel <ha...@afaics.de> wrote:
Package: kodi
Version: 2:20.5+dfsg-2+b2
kodi dies immediately with
{harri@cecil:~ (master) 1032} kodi
/usr/bin/kodi: 1: ulimit: error setting limit (Operation not permitted)
kodi: ulimit is unsupported by this shell
libva info: VA-API version 1.21.0
libva error: vaGetDriverNames() failed with unknown libva error
Fatal Python error: PyImport_AppendInittab: PyImport_AppendInittab() may not be
called after Py_Initialize()
Python runtime state: core initialized
Thread 0x00007fa184c006c0 (most recent call first):
File "<frozen importlib._bootstrap_external>", line 1648 in _fill_cache
File "<frozen importlib._bootstrap_external>", line 1605 in find_spec
File "<frozen importlib._bootstrap_external>", line 1502 in _get_spec
File "<frozen importlib._bootstrap_external>", line 1528 in find_spec
File "<frozen importlib._bootstrap>", line 1262 in _find_spec
File "<frozen importlib._bootstrap>", line 1322 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
Aborted
According to
https://www.reddit.com/r/kodi/comments/1coowz1/crash_in_pyimport_appendinittab_pyimport/?rdt=36220
this is a regression with python 3.12. If I move back to 3.11 the problem
disappears.
According to the reddit link the problem has been fixed with kodi 21. Looking
at the code in git this could be commit
1bfa3ef9e3b6d25d581bb1f48f6a740fca1c06cf.
Regards
Harri