flit icon indicating copy to clipboard operation
flit copied to clipboard

Page Not Found (404) adter upload

Open Yura52 opened this issue 4 years ago • 5 comments

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?

Yura52 avatar Jun 12 '20 17:06 Yura52

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

bpabel avatar Jun 12 '20 18:06 bpabel

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>

Yura52 avatar Jun 12 '20 18:06 Yura52

@takluyver Could probably close this as a duplicate of #179

bpabel avatar Jun 12 '20 18:06 bpabel

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.

takluyver avatar Jun 13 '20 11:06 takluyver

Created a ticket on warehouse, since it is indeed returning a 200 response pypa/warehouse#8104

bpabel avatar Jun 14 '20 06:06 bpabel

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.

takluyver avatar Jan 28 '24 12:01 takluyver