[英]Why does the following error pop up when twine uploading files to pypi
當我執行以下幾行並輸入我的信息時
twine upload dist/*
彈出以下錯誤
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/
轉到網址后,我並沒有更接近解決問題。 我的 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',
)
如果對此有任何解決方案,請告訴我。 謝謝你。
兩種可能:
long_description_content_type
的舊發行long_description_content_type
。 確保您從一個空的dist
目錄開始,重建您的發行版,然后上傳。long_description_content_type
之前,您正在使用某些打包依賴項的舊版本。 你需要setuptools>=38.6.0
, wheel>=0.31.0
和twine>=1.11.0
。 使用python -m pip install -U setuptools wheel twine
它們全部升級,然后執行 #1。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.