Python 3.11 Function Apps may fail to load with No module named 'pkg_resources'
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Start by checking the Python 3.11 worker startup and function indexing behavior described in the issue, then look for where the worker image or dependency environment supplies setuptools. The issue identifies a mitigation in requirements.txt and the setuptools version change from 65.5.1 to 84.2.1. Done means affected apps can load functions when pkg_resources is imported; the issue does not name a test or code entry point.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Some Python 3.11 Azure Function Apps may fail to load their functions after receiving an updated platform image. Logs show:
ModuleNotFoundError: No module named 'pkg_resources'
The Functions host may start, but function indexing fails, leaving affected functions unavailable. This can occur without changes to application code or dependencies.
Apps are affected when their code—or an installed dependency—imports pkg_resources and relies on the platform image to provide it.
Cause
The updated Python 3.11 image upgraded setuptools from 65.5.1 to 84.2.1. Setuptools removed the deprecated pkg_resources module starting with 82.0.0.
Applications that do not explicitly install a compatible setuptools version can therefore lose access to pkg_resources when the underlying image updates.
Mitigation
Add the following dependency to your app’s requirements.txt , replacing any existing setuptools requirement, and redeploy:
setuptools>=78.1.1,<82
This installs an application-local version of setuptools that still includes pkg_resources , rather than relying on the platform image’s copy. Restarting the app alone does not install this dependency.
For a long-term solution, update affected dependencies or migrate to supported alternatives such as importlib.metadata and importlib.resources .
- Ngôn ngữ chính
- Python
- Star
- 357
- Fork
- 118
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/azure-functions-python-worker
-
[Bug] ASGI cookie conversion serializes an absent Domain attribute and breaks __Host- cookiesCó thể đã có người làm @tharun06 đã nhận 47 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Azure/azure-functions-python-worker#1902 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
Azure/azure-functions-python-worker#1908 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Azure/azure-functions-python-worker#1906 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Azure/azure-functions-python-worker#1904 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Python 3.14 proxy worker] Missing sys.modules["__main__"] breaks multiprocessing spawnCó thể đã có người làm @Fire162 đã nhận 24 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Azure/azure-functions-python-worker#1903 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của Azure/azure-functions-python-worker
Issue tương tự
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)Có thể đã có người làm @geyazheng đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
langchain-ai/langchain-aws#1469 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GCToggler leaves collection enabled if the body re-enables itCó thể đã có người làm @Gambit-Checkmate đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
EESSI/docs#949 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
doronz88/pymobiledevice3#2176 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
b4b usability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày