Uploading package to pypi using twine: Invalid URI

爷,独闯天下 提交于 2019-12-10 23:48:58

问题


I followed the official documentation for uploading packages to PyPI, as well as the information provided in PyPI readme, but I get a HTTP 400 error each time:

$ 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

What is going on ?


回答1:


The problem was with the package url defined in setup.py

Invalid URI means the url field in the setup() function is not a valid url. It should be something like url="https://github.com/namespace/repo" for example

This is the url to the package code, and the new pypi repo doesn't accept package with wrong url.

see this issue on twine's repo



来源:https://stackoverflow.com/questions/44672358/uploading-package-to-pypi-using-twine-invalid-uri

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!