Python 3.11 Function Apps may fail to load with No module named 'pkg_resources'
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 .
- Lingua principale
- Python
- Stelle
- 357
- Fork
- 118
- Merge medio
- 2g 6h
- PR unite (30g)
- 10
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/azure-functions-python-worker
-
[Bug] ASGI cookie conversion serializes an absent Domain attribute and breaks __Host- cookiesForse già presa @tharun06 l’ha presa 47 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Azure/azure-functions-python-worker#1902 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
Azure/azure-functions-python-worker#1908 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Azure/azure-functions-python-worker#1906 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Azure/azure-functions-python-worker#1904 ·
I maintainer di solito rispondono entro 2 giorni
-
[Python 3.14 proxy worker] Missing sys.modules["__main__"] breaks multiprocessing spawnForse già presa @Fire162 l’ha presa 24 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Azure/azure-functions-python-worker#1903 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di Azure/azure-functions-python-worker
Issue simili
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)Forse già presa @geyazheng l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
langchain-ai/langchain-aws#1469 ·
I maintainer di solito rispondono entro 1 giorno
-
GCToggler leaves collection enabled if the body re-enables itForse già presa @Gambit-Checkmate l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
doronz88/pymobiledevice3#2176 ·
I maintainer di solito rispondono entro 1 giorno
-
b4b usability
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno