[英]Why does the following error pop up when twine uploading files to pypi
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)我的 setup.py 如下(带有空白信息)
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.谢谢你。
Two possibilities:两种可能:
long_description_content_type
.您忘记重建发行版或正在上传没有long_description_content_type
的旧发行long_description_content_type
。 Make sure you're starting with an empty dist
directory, rebuild your distribution and then upload.确保您从一个空的dist
目录开始,重建您的发行版,然后上传。long_description_content_type
was supported.在支持long_description_content_type
之前,您正在使用某些打包依赖项的旧版本。 You need setuptools>=38.6.0
, wheel>=0.31.0
and twine>=1.11.0
.你需要setuptools>=38.6.0
, wheel>=0.31.0
和twine>=1.11.0
。 Upgrade them all with python -m pip install -U setuptools wheel twine
and then do #1.使用python -m pip install -U setuptools wheel twine
它们全部升级,然后执行 #1。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.