Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload rejected due to failure to render description #178

Closed
KenKundert opened this issue Oct 31, 2020 · 3 comments
Closed

Upload rejected due to failure to render description #178

KenKundert opened this issue Oct 31, 2020 · 3 comments

Comments

@KenKundert
Copy link

When uploading the latest version of nestedtext, the upload was rejected due to a failure to render the description even though twine check passed.

% py setup.py sdist bdist_wheel
running sdist
   ...
adding 'nestedtext.py'
adding 'nestedtext-1.2.0.dist-info/LICENSE'
adding 'nestedtext-1.2.0.dist-info/METADATA'
adding 'nestedtext-1.2.0.dist-info/WHEEL'
adding 'nestedtext-1.2.0.dist-info/top_level.txt'
adding 'nestedtext-1.2.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
% twine check  dist/*                                                       
Checking dist/nestedtext-1.2.0-py3-none-any.whl: PASSED
Checking dist/nestedtext-1.2.0.tar.gz: PASSED
% twine upload dist/*                                                       
Uploading distributions to https://upload.pypi.org/legacy/
Uploading nestedtext-1.2.0-py3-none-any.whl
100%|█████████████████████████████████████████████████████| 25.1k/25.1k [00:00<00:00, 27.6kB/s]
NOTE: Try --verbose to see response content.
HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
The description failed to render for 'text/x-rst'. See https://pypi.org/help/#description-content-type for more information.

The README file is restructuredtext, and long_description_content_type = 'text/x-rst'.
Finally, I have run readme_renderer on the README.rst file without there being a report of any issues.

I am at a loss as to what to do next. I think the problem is on your end, but I am not sure.

@KenKundert
Copy link
Author

KenKundert commented Oct 31, 2020

Okay, I have figured this out. The problem was the following lines in the README.rst file:

.. code-block:: nestedtext

nestedtext is a format that has been submitted to pygments but has yet to be accepted and supported. Most renderers will ignore the nestedtext tag if it is unknown, but apparently your renderer is a bit more sensitive.

As far as I am concerned this issue can be closed. I will leave it open for now in case you want to use it as a reminder to make it so that twine check reports this error.

@di
Copy link
Member

di commented Nov 6, 2020

Twine uses the same rendere that PyPI uses, I would expect this to have the same behavior in both cases. Transferring to readme_renderer's tracker to investigate why this happened.

@di di transferred this issue from pypi/warehouse Nov 6, 2020
@miketheman
Copy link
Member

I recently added a test to confirm that RST would continue to render despite an unknown code block directive: #256

Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants