1

When I execute the following lines and put in my information

twine upload dist/*

The following error pops up

HTTPError: 400 Client Error: The description failed to render in the default format of reStructuredText. See https://pypi.org/help/#description-content-type for more information. for url: https://upload.pypi.org/legacy/

After going to the url, I am not closer to solving the problem. My setup.py is the following (with blanked out information)

import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="quizmaker",
    version="0.0.1",
    author="my secret name",
    author_email="email",
    description="secret descripting",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="the url",
    packages=setuptools.find_packages(),

    python_requires='>=3.6',
)

If there is any solution to this please let me know. Thank you.

1 Answers1

1

Two possibilities:

  1. You forgot to rebuild the distribution or are uploading an old distribution without long_description_content_type. Make sure you're starting with an empty dist directory, rebuild your distribution and then upload.
  2. You're using an old version of some packaging dependency before long_description_content_type was supported. You need setuptools>=38.6.0, wheel>=0.31.0 and twine>=1.11.0. Upgrade them all with python -m pip install -U setuptools wheel twine and then do #1.
Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82