[BUG] AttributeError: module 'pkgutil' has no attribute 'get_loader'
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 57/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- docker, python
- 领域
- build-system
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Dockerfile
- 星标
- 110
- 派生
- 17
- 平均合并
- 3 分钟
- 30 天内合并 PR
- 1
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
The-Swarm-Corporation/swarms-rs#167 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
CONTRIBUTING.md and the release checklist still describe tag-based versioning and a `develop` branch未关闭docs
难度 2/5 1-3 小时 新手友好度 82/100
developmentseed/titiler-cmr#355 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复