python
install_error
ai_generated
true
RuntimeError: Form data requires "python-multipart" to be installed.
ID: python/fastapi-form-data-missing-python-multipart
80%Fix Rate
90%Confidence
0Evidence
2024-03-22First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 0.100+ | active | — | — | — |
Root Cause
A route used Form or File parameters but the python-multipart package was not installed in the environment.
generic中文
路由使用了 Form 或 File 参数,但环境中未安装 python-multipart 包。
Workarounds
-
98% success
pip install python-multipart
-
95% success
echo 'python-multipart>=0.0.9' >> requirements.txt pip install -r requirements.txt
Dead Ends
Common approaches that don't work:
-
80% fail
Body expects JSON; form-encoded clients receive 422 errors.
-
90% fail
There is no stdlib multipart parser; import fails.