ModuleNotFoundError: No module named 'fastapi'
envgap__Lancetnik__Propan-87
01 / FAILURE SIGNATURE
Captured in a clean container
ModuleNotFoundError: No module named 'fastapi'
02 / ENVIRONMENT RECIPE
- Base commit
564322a219490a1d3324cc780725de66e5392b26- Manifest
pyproject.toml- Reproduce
python3 -m pip install fast-depends==2.0.3 pydantic==1.10.9 typer==0.9.0 && python3 -m pip install ".[async-rabbit]" && python3 -c "from propan import PropanApp; print(PropanApp.__module__)"- Run under trace
python3 -c "from propan import PropanApp; print(PropanApp.__module__)"
Reference environment fix used for admission
diff --git a/pyproject.toml b/pyproject.toml
index 55ada50..d1a6f42 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -43,9 +43,11 @@ classifiers = [
]
dependencies = [
- "fast-depends>=2.0.3",
+ "fast-depends==2.0.3",
+ "fastapi==0.99.0",
+ "pydantic==1.10.9",
"watchfiles",
- "typer",
+ "typer==0.9.0",
"uvloop>=0.14.0,!=0.15.0,!=0.15.1; sys_platform != 'win32' and (sys_platform != 'cygwin' and platform_python_implementation != 'PyPy')",
]03 / ORIGINAL ISSUE TEXT
Lancetnik/Propan #87 · read the original issue
When installing Propan without an optional `doc`, an error occurs when there is no `fastapi`.
Install cmd: `python -m pip install propan[async-rabbit]`
Propan version: `0.1.4.1`
```bash
Traceback (most recent call last):
File ".../.venv/bin/propan", line 5, in <module>
from propan.__main__ import cli
File ".../.venv/lib/python3.9/site-packages/propan/__init__.py", line 3, in <module>
from propan.brokers import PropanMessage
File ".../.venv/lib/python3.9/site-packages/propan/brokers/__init__.py", line 1, in <module>
from propan.brokers._model.schemas import PropanMessage
File ".../.venv/lib/python3.9/site-packages/propan/brokers/_model/__init__.py", line 1, in <module>
from propan.brokers._model.broker_usecase import BrokerUsecase
File ".../.venv/lib/python3.9/site-packages/propan/brokers/_model/broker_usecase.py", line 31, in <module>
from propan.brokers._model.schemas import BaseHandler, PropanMessage
File ".../.venv/lib/python3.9/site-packages/propan/brokers/_model/schemas.py", line 10, in <module>
from propan._compat import get_model_fileds, model_schema, update_model_example
File ".../.venv/lib/python3.9/site-packages/propan/_compat.py", line 7, in <module>
from fastapi import __version__ as FASTAPI_VERSION
ModuleNotFoundError: No module named 'fastapi'
```04 / LABELS
Labels checked by running the task · assistant reviewed
misspecificationsecurityunderspecificationLabel rules and the text that matched
[
{
"category": "misspecification",
"rule": "diff.changes_existing_manifest_line",
"source": "manifest_diff:pyproject.toml",
"excerpt": "- \"fast-depends>=2.0.3\",\n- \"typer\",\n+ \"fast-depends==2.0.3\",\n+ \"fastapi==0.99.0\",\n+ \"pydantic==1.10.9\",\n+ \"typer==0.9.0\","
},
{
"category": "underspecification",
"rule": "diff.adds_omitted_runtime_requirement",
"source": "manifest_diff:pyproject.toml",
"excerpt": "fastapi, pydantic"
},
{
"category": "security",
"rule": "audit.nonempty_security_flags",
"source": "security_flags",
"excerpt": "[\"unpinned\"]"
}
]Historical install-only results are not EnvGap validation.
Bootstrap commands are explicit benchmark prerequisites executed identically before original and gold manifests; they prevent unrelated modern build-tool/API drift.
Current registry downloads are permitted in these preparation checks. Unpinned transitives are not historically reconstructed.
Gold was verified in a fresh envgap-python-eval container; runtime tracing is scored separately by envgap eval.
Preparation uses current registries. Historical package availability is not enforced here; execution metadata records this limitation separately from the oracle's date-bounding policy.