PyPI upload failed: "The description failed to render in the default format of reStructuredText"

Worked fine for an earlier build, but does not deploy all of a sudden.

PyPI upload failed.
failed to deploy

https://travis-ci.org/github/fbradyirl/openwrt-luci-rpc/builds/723055890

Diff: https://github.com/fbradyirl/openwrt-luci-rpc/compare/v1.1.5...v1.1.6

Bottom line: This is a change at PyPI. Follow the instructions at https://github.com/pypa/warehouse/issues/5890#issuecomment-494868157.

P.S. your artifacts weren’t uploaded, as can be seen at https://pypi.org/project/openwrt-luci-rpc/#history. So you can stop bumping versions, delete tags that failed to upload and recreate the first tag that failed after you fix the problem.


If you expand “Deploying application” or see the raw log, you’ll see https://travis-ci.org/github/fbradyirl/openwrt-luci-rpc/builds/723055890#L451-L455:

Uploading openwrt_luci_rpc-1.1.6-py2.py3-none-any.whl
100%|██████████| 16.1k/16.1k [00:00<00:00, 30.6kB/s]
NOTE: Try --verbose to see response content.
HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
The description failed to render in the default format of reStructuredText. See https://pypi.org/help/#description-content-type for more information.

Googling this error message produces https://github.com/pypa/warehouse/issues/5890
which confirms that this is a change at PyPI that strictens the description format check:

The cause is that in [#5835](http The cause is that in #5835 we merged a change which blocks uploads that have an invalid long_description that we won’t be able to render. This is intentional and not a bug.

(follows is the guilde on what to do)

Genius! Thanks so much for the pointer on this. I didn’t realise I could expand the deployment to see the actual error.

That’s why I usually look at the raw log to find suspicious stuff. You never know under which fold the info you need might be.

1 Like
Imprint