使用twine将包上载到pypi:URI无效

2024-06-01 08:52:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我按照official documentation将包上载到PyPI,以及PyPI自述文件中提供的信息,但是每次都会收到一个HTTP 400错误:

$ twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy
Enter your username: Sinistag
Enter your password:
Uploading paulla.check_dns_sync-0.1.dev0.py3-none-any.whl
HTTPError: 400 Client Error: home_page: Invalid URI for url: https://upload.pypi.org/legacy

怎么回事?在


Tags: httpsorgpypi信息httpyourdocumentation错误
1条回答
网友
1楼 · 发布于 2024-06-01 08:52:28

问题出在setup.py中定义的包url

Invalid URI表示setup()函数中的url字段不是有效的url。例如,它应该是url="https://github.com/namespace/repo"

这是包代码的url,新的pypi repo不接受具有错误url的包。在

请参见twine回购的this issue

相关问题 更多 >