[BUG] AttributeError: module 'pkgutil' has no attribute 'get_loader'
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 57/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- docker, python
- Bereich
- build-system
Rechercherichtung
Start from the Dockerfile: find where the Alpine base image is pinned, where python3 is installed, and where confuse is pulled in via pip. The failure is in confuse/util.py calling the removed pkgutil.get_loader, so the fix is either bumping confuse to a release using importlib or pinning Python back to 3.12. Reproduce by building the image and running python3 /app/diskover/diskover.py; done means it starts without the AttributeError.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
#72 updated the base Alpine image from 3.20 to 3.24. This changed the installed Python from 3.12 to 3.14, which removed pkgutil.get_loader(), which the diskover Python script (via library dependency confuse) depends on:
Traceback (most recent call last):
File "/app/diskover/diskover.py", line 35, in <module>
from diskover_elasticsearch import elasticsearch_connection, \
check_index_exists, create_index, bulk_upload, tune_index
File "/app/diskover/diskover_elasticsearch.py", line 25, in <module>
from diskover_helpers import config, load_plugins
File "/app/diskover/diskover_helpers.py", line 42, in <module>
config = db_getconfig()
File "/app/diskover/diskover_db.py", line 71, in db_getconfig
config_confuse = confuse.Configuration('diskover', __name__)
File "/lsiopy/lib/python3.14/site-packages/confuse/core.py", line 570, in __init__
self._package_path = util.find_package_path(self.modname)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.14/site-packages/confuse/util.py", line 58, in find_package_path
loader = pkgutil.get_loader(name)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'get_loader'
diskover failed with exit code 1
diskover shouldn't be confused with diskover-web. Both are part of the image, but the latter is started by the image automatically, while the former is run manually by users to tell diskover to regenerate its index.
Expected Behavior
No response
Steps To Reproduce
Start a container running linuxserver/diskover:v2.3.5-ls254, open a shell, and attempt to run python3 /app/diskover/diskover.py
Environment
- OS: Rocky 10
CPU architecture
x86-64
Docker creation
services:
diskover:
image: lscr.io/linuxserver/diskover:latest
container_name: diskover
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- ES_HOST=elasticsearch
- ES_PORT=9200
volumes:
- /volumes/diskover/config:/config
- /mnt/all:/data:ro
expose:
- "80"
restart: unless-stopped
Container logs
Nothing interesting in the logs since the entrypoint just runs a separate PHP web server
- Vorherrschende Sprache
- Dockerfile
- Sterne
- 110
- Forks
- 17
- Ø Merge
- 3 Min.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
The-Swarm-Corporation/swarms-rs#167 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 2 Tagen
-
CONTRIBUTING.md and the release checklist still describe tag-based versioning and a `develop` branchOffendocs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
developmentseed/titiler-cmr#355 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag