flit
flit copied to clipboard
Page Not Found (404) adter upload
Hi! After the command flit publish --repository testpypi
was successfully executed, I was given the link where my project was placed:
https://test.pypi.org/project/libzero
However, the link yields "Page Not Found (404)". Is there any lag between the upload and availability of the project? If yes, how much is it?
There shouldn't be a lag in the project being available. There is sometimes a lag in the search feature on warehouse indexing the newly uploaded project.
What is the repository url you have defined in your .pypirc
file?
I ran into a similar issue if I left the trailing slash off the repository url
UPDATE: indeed, the absent slash was the problem, now it works fine, thank you. Looks like it is worth raising a warning in such case.
@bpabel here is the content of my .pypirc:
[distutils]
index-servers =
testpypi
[testpypi]
repository = https://test.pypi.org/legacy
username = __token__
password = <token>
@takluyver Could probably close this as a duplicate of #179
I think in the first instance, this should be reported to warehouse, the code that runs the PyPI server. It shouldn't be accepting and ignoring an upload - it should either work, or the HTTP response (which flit publish
checks) should indicate an error.
Then we can look at providing convenience measures in Flit.
Created a ticket on warehouse, since it is indeed returning a 200
response pypa/warehouse#8104
It looks like Warehouse added a redirect with HTTP status 308, which should work for POST requests. Requests follows redirects by default, and we're not overriding that, so I think this should be working. If you still see a problem, let me know; we can either reopen this or start a new issue.