简体   繁体   中英

Uploading package to pypi using twine: Invalid URI

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 ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM