On Wed, 22 Mar 2023 12:32:46 +0100 (CET) "FOUR Ludovic (EXT)" ludovic.four@unistra.fr wrote:
Sorry for delays. I've resolved my nav upgrade problem.
Great to hear!
In the error logs, I found this : [Wed Mar 22 [timestamp] 2023] [wsgi:error] [pid xxxx] [remote <IP xxx>:<port xxx>] pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '7.5.3-deb10u1' (package: reportbug)
The problem was the installed package reportbug (https://wiki.debian.org/reportbug) This package is automatically installed with python3
I don't know how it can trigger an error 500 (maybe add some apache module), but in my case, the problem was solved by removing this package + apt autoremove
Ah, I've seen this reported before, and it appears to be a very Debian-specific problem.
The Debian package `reportbug` is a Python package that has what Python's packaging system considers to be an invalid version number, and for some reason, this triggers an error whenever the Python package `pkg_resources` is used to query about Python package resources on the system.
It isn't entirely clear to me whether the problem is with Debian or Python itself. It might be a problem that goes away once we stop supporting Python 3.7 in NAV and can replace `pkg_resources` with `importlib.metadata`, which is "the new thing" in Python.
But the only workaround for now is the one you've discovered: Uninstall the `reportbug` package.