400 Client Error when trying to install prodigy using poetry

I'm trying to install prodigy using poetry but I get the following error (omitted everything after ? with ...)

400 Client Error: Bad Request for url: https://s3.eu-west-1.amazonaws.com/data.prodi.gy/dist/prodigy-1.11.7-cp310-cp310-linux_aarch64.whl?...

I'm also puzzled why it says cp310 since I'm running python 3.9.9 but maybe that's not related.

To reproduce

Init a poetry project with poetry init and add the following to pyproject.toml


[[tool.poetry.source]]
name = "prodigy"
url = "https://[LICENCE_KEY]@download.prodi.gy/index"

Then try to install prodigy by running poetry add prodigy.

Further context

If I run poetry run pip install -r requirements.txt with --extra-index-url set then it works just fine. A very notable difference in the url's requested is

https://s3.eu-west-1.amazonaws.com/data.prodi.gy/dist/prodigy-1.11.7-cp39-cp39-linux_x86_64.whl?....

versus the above.

Ah, it looks like you're unfortunately running into this known poetry issue with HTTP Basic Auth credentials in URLs (which is still open):

In the meantime, you could pre-download the wheels and use Poetry to install from a path: Installing from wheels. · Issue #76 · python-poetry/poetry · GitHub

1 Like

I guess I could yes but then it wouldn't be platform agnostic, right? I need to support ubuntu, mac, mac m1 unfortunately.

I'm not super familiar with poetry but does it have something equivalent to pip's -f option that you can point to a local directory of files and that will automatically pick the best-matching wheel for the given platform? https://prodi.gy/docs/install#wheel

Another option would be to run a mini local PyPi index that serves the wheels – but that's of course a bit more involved.

1 Like