Closed kmisiarz closed 8 months ago
presumably http://<my_server>/packages/stable/ray-pipelining/
is either not providing a list of package, or that list does not include anything suitable.
this isn't going to be a poetry problem: you'll either have misconfigured devpi, or pointed poetry at the wrong url
From work config, a source line to our internal devpi instance: url = "https://pypi.asci.synchrotron.org.au/bsx/dev/+simple/"
so give "+simple/" a go instead of "/simple"
@clintonroy I've tried with +stable
instead of stable
but it didn't change anything. @dimbleby I'm using this configuration with pip.conf:
[global]
timeout = 60
index-url = http://<my-server>/packages/stable
trusted-host = <my-server>
I can install the package with pip install ray-pipelining
Is it possible that the poetry doesn't see the server as a trusted source?
+stable
was not the suggestionwhere should I put +simple
? why pip works and poetry not with the same index path?
Experienced the same issue, trying to use some old devpi-server (version 4.9.0)..
Interestingly, switching from something like this
url = "http://<my_server>/packages/stable"
to this
url = "http://<my_server>/packages/stable/+simple"
did the trick for me.
I have no idea, but it could be that "+simple" somehow tells poetry to use the "simple" GET/PUT communication protocol?
I experience the following issue when try to install from private repo using poetry add <my_package>
:
415 Client Error: Unsupported Media Type for url: http://localhost:8000/user/dev/<my_package>/
At the same time
pip install --index-url http://localhost:8000/username/dev <my_package>
works well
Is there any solution?
Please read the devpi docs. Normally, the index url ends with /+simple
.
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.
[[tool.poetry.source]] name = "PyPI" priority = "primary"
[[tool.poetry.source]] name = "devpi" url = "http:///packages/stable/"
priority = "supplemental"
-vvv
option) and have included the output below.Issue
I'm trying to install my package from the local source. I believe the package was found on: [urllib3.connectionpool] http:// "GET /packages/stable/ray-pipelining HTTP/1.1" 200 None
but this line raises an Exception:
[urllib3.connectionpool] http:// "GET /packages/stable/ray-pipelining/ HTTP/1.1" 302 219
and the package is not installed. Any ideas how to fix this?
(experiment-1-py3.10) ➜ experiment_1 git:(main) ✗ poetry -vvv add ray-pipelining Adding repository PyPI (https://pypi.org/simple/) and setting it as primary Adding repository devpi (http:///packages/stable) and setting it as supplemental
Using virtualenv: /home/kmisiarz/.cache/pypoetry/virtualenvs/experiment-1-0-pkM5At-py3.10
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS
Creating new session for pypi.org
[urllib3.connectionpool] Starting new HTTPS connection (1): pypi.org:443
[urllib3.connectionpool] https://pypi.org:443 "GET /simple/ray-pipelining/ HTTP/1.1" 404 13
Source (PyPI): No packages found for ray-pipelining
Source (PyPI): 0 packages found for ray-pipelining
Creating new session for
[urllib3.connectionpool] Starting new HTTP connection (1):
[urllib3.connectionpool] http:// "GET /packages/stable/ray-pipelining/ HTTP/1.1" 302 219
[urllib3.connectionpool] http:// "GET /packages/stable/ray-pipelining HTTP/1.1" 200 None
Source (devpi): Response URL http:///packages/stable/ray-pipelining differs from request URL http:///packages/stable/ray-pipelining/
Source (devpi): 0 packages found for ray-pipelining
Stack trace:
9 ~/.local/lib/python3.10/site-packages/cleo/application.py:327 in run 325│ 326│ try: → 327│ exit_code = self._run(io) 328│ except BrokenPipeError: 329│ # If we are piped to another process, it may close early and send a
8 ~/.local/lib/python3.10/site-packages/poetry/console/application.py:190 in _run 188│ self._load_plugins(io) 189│ → 190│ exit_code: int = super()._run(io) 191│ return exit_code 192│
7 ~/.local/lib/python3.10/site-packages/cleo/application.py:431 in _run 429│ io.input.interactive(interactive) 430│ → 431│ exit_code = self._run_command(command, io) 432│ self._running_command = None 433│
6 ~/.local/lib/python3.10/site-packages/cleo/application.py:473 in _run_command 471│ 472│ if error is not None: → 473│ raise error 474│ 475│ return terminate_event.exit_code
5 ~/.local/lib/python3.10/site-packages/cleo/application.py:457 in _run_command 455│ 456│ if command_event.command_should_run(): → 457│ exit_code = command.run(io) 458│ else: 459│ exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED
4 ~/.local/lib/python3.10/site-packages/cleo/commands/base_command.py:119 in run 117│ io.input.validate() 118│ → 119│ status_code = self.execute(io) 120│ 121│ if status_code is None:
3 ~/.local/lib/python3.10/site-packages/cleo/commands/command.py:62 in execute 60│ 61│ try: → 62│ return self.handle() 63│ except KeyboardInterrupt: 64│ return 1
2 ~/.local/lib/python3.10/site-packages/poetry/console/commands/add.py:160 in handle 158│ return 0 159│ → 160│ requirements = self._determine_requirements( 161│ packages, 162│ allow_prereleases=self.option("allow-prereleases"),
1 ~/.local/lib/python3.10/site-packages/poetry/console/commands/init.py:381 in _determine_requirements 379│ elif "version" not in requirement: 380│ # determine the best version automatically → 381│ name, version = self._find_best_version_for_package( 382│ requirement["name"], 383│ allow_prereleases=allow_prereleases,
ValueError
Could not find a matching version of package ray-pipelining
at ~/.local/lib/python3.10/site-packages/poetry/console/commands/init.py:422 in _find_best_version_for_package 418│ ) 419│ 420│ if not package: 421│ # TODO: find similar → 422│ raise ValueError(f"Could not find a matching version of package {name}") 423│ 424│ return package.pretty_name, f"^{package.version.to_string()}" 425│ 426│ def _parse_requirements(self, requirements: list[str]) -> list[dict[str, Any]]: