You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A multipart action form needs python-multipart, which the actions docs never mention #83
An action called from a form sent as multipart/form-data, for example a form with a file input, goes through request.form() in nexy/modules/routers/actions/endpoint.py (_payload). Starlette's request.form() asserts that python-multipart is installed (starlette/requests.py: "The python-multipart library must be installed to use form parsing."). Nexy does not depend on python-multipart, so in a project without it the call should fail with a 500.
A form sent as application/x-www-form-urlencoded is parsed with parse_qsl and is not affected.
Where it is documented
python-multipart is mentioned for Form/File/UploadFile (docs/reference/python-api.md) and for uploads (docs/guides/recipes.md), but not in docs/guides/actions.md.
Done when
A multipart action call without python-multipart answers a clear error that names the package, not a bare 500. The dev log says uv add python-multipart.
docs/guides/actions.md says when the package is needed.
Thanks both for offering to take this, and sorry for the silence — I have been quite busy lately and did not update the issue after starting on it myself.
The fix is done on fix/actions-multipart-error and proposed in #357: the actions endpoint checks for python-multipart before parsing a multipart body, the error names uv add python-multipart, the actions guide and the Python API reference say when the package is needed, and the tests cover the missing-package case. Once #357 lands this issue closes.
@tharunsridhar, please do not feel you lost work for nothing — thank you for the offer and for the interest in Nexy. Two good first issues are still open and unassigned if you would like another: #304 (four config hooks missing from the reference) and #302 ([[...slug]] not documented). And @dbdefault, the same goes for you — thanks for the PR, and you are very welcome to pick up #304 or #302 next.
A multipart action form sent without python-multipart now raises a 500 whose message names the package and the command to install it (uv add python-multipart), instead of a traceback that buried it. Url-encoded forms still need nothing.
The docs cover it too: docs/guides/actions.md says when the package is needed, and the Form / File / UploadFile row of the reference now names multipart bodies, translations included.
Closing as completed — it ships in the next release.
Activity
dbdefault commentedon Nov 12, 2026
I'll take this issue. I'll fork the repo and start working on it.
Espoir-Loem commentedon Nov 12, 2026
Thanks both for offering to take this, and sorry for the silence — I have been quite busy lately and did not update the issue after starting on it myself.
The fix is done on
fix/actions-multipart-errorand proposed in #357: the actions endpoint checks forpython-multipartbefore parsing a multipart body, the error namesuv add python-multipart, the actions guide and the Python API reference say when the package is needed, and the tests cover the missing-package case. Once #357 lands this issue closes.@tharunsridhar, please do not feel you lost work for nothing — thank you for the offer and for the interest in Nexy. Two
good first issues are still open and unassigned if you would like another: #304 (four config hooks missing from the reference) and #302 ([[...slug]]not documented). And @dbdefault, the same goes for you — thanks for the PR, and you are very welcome to pick up #304 or #302 next.Espoir-Loem commentedon Nov 12, 2026
Fixed by #357, merged into
develop.A multipart action form sent without
python-multipartnow raises a500whose message names the package and the command to install it (uv add python-multipart), instead of a traceback that buried it. Url-encoded forms still need nothing.The docs cover it too:
docs/guides/actions.mdsays when the package is needed, and theForm/File/UploadFilerow of the reference now names multipart bodies, translations included.Closing as completed — it ships in the next release.