12

I have a pyproject.toml:

...
[[tool.poetry.source]]

name = "REPO_NAME"
url = "https://gitlab.com/SOME_ADDRESS"
secondary = true

When trying to install the project using poetry (poetry install/poetry update) i get:

Updating dependencies Resolving dependencies... (14.3s)

TooManyRedirects

Exceeded 30 redirects.

Tsvi Sabo
  • 575
  • 2
  • 11

3 Answers3

25

Currently pypi.python.org is having an issue and there is nothing one can do about it:

enter image description here

But hey, it's Friday.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
7

Clearing the cache seemed to do the trick:

poetry cache clear --all REPO_NAME

Also, it could happen on global PYPI, in that case run:

poetry cache clear --all pypi

To list all poetry's repos:

poetry cache list
Tsvi Sabo
  • 575
  • 2
  • 11
  • I had the same issue. [See also how to rebuild Poetry installation](https://stackoverflow.com/questions/70064449/how-to-rebuild-poetry-environment-from-scratch-and-force-reinstall-everything/70064450#70064450). – Mikko Ohtamaa Jun 10 '22 at 11:31
3

There has been an issue with PyPI Json endpoints that poetry uses. pip was unaffected because it uses different endpoints.

A workaround is to export poetry dependencies to the requirements.txt format and use pip:

poetry export --dev > requirements.txt && pip install -r requirements.txt
Carles Barrobés
  • 11,608
  • 5
  • 46
  • 60