Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poetry lock: [TooManyRedirects] Exceeded 30 redirects. #1445

Closed
3 tasks done
DanCardin opened this issue Oct 7, 2019 · 3 comments
Closed
3 tasks done

poetry lock: [TooManyRedirects] Exceeded 30 redirects. #1445

DanCardin opened this issue Oct 7, 2019 · 3 comments
Labels
kind/bug Something isn't working as expected

Comments

@DanCardin
Copy link
Contributor

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: macos mojave

  • Poetry version: 1.0.0b1

Issue

On poetry lock, anything that depends on mypy (and through mypy, mypy_extensions) results in 301

[tool.poetry]
name = "foo"
version = "0.1.0"
description = ""
authors = []

[tool.poetry.dev-dependencies]
mypy = "*"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

The error happens here:

  File "$HOME/.poetry/lib/poetry/_vendor/py3.6/requests/sessions.py", line 166, in resolve_redirects
    raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)

Printing the url and response text inside that block, I see
https://pypi.org/pypi/mypy-extensions/json {"message": "The resource has been moved to /pypi/mypy_extensions/json; you should be redirected automatically.\n\n", "code": "301 Moved Permanently", "title": "Moved Permanently"}
and printing outside that block, I see it flipping back and forth between mypy_extensions and mypy-extensions.

In the browser, both _ and - result in my ending up at mypy-extensions, as does running it in a python prompt

>>> requests.get('https://pypi.org/pypi/mypy-extensions/json').url
'https://pypi.org/pypi/mypy-extensions/json'
>>> requests.get('https://pypi.org/pypi/mypy_extensions/json').url
'https://pypi.org/pypi/mypy-extensions/json'

I can't tell if I ought to submit this against warehouse instead, because of the apparent behavior coming from the requests, but i can't reproduce outside the context of this poetry call.

@DanCardin DanCardin added the kind/bug Something isn't working as expected label Oct 7, 2019
@pablogamboa
Copy link

poetry cache:clear --all pypi

@DanCardin
Copy link
Contributor Author

That worked, thanks! (poetry cache clear --all pypi in 1.0b1). Was this caused by a change on pypi?

With that knowledge, I searched and found #728, my bad :(

Is this something that ought to be in the docs somewhere? the cache command isn't documented

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants