Open nanoy42 opened 4 months ago
It's happening the same to me when trying to execute poetry add django-tenants==3.7.0
with poetry 1.8.3 and Python 3.11.
I was able to work around this by applying the following patch:
diff --git a/src/poetry/repositories/http_repository.py b/src/poetry/repositories/http_repository.py
index 6c000ac9..aae8c92b 100644
--- a/src/poetry/repositories/http_repository.py
+++ b/src/poetry/repositories/http_repository.py
@@ -325,6 +325,9 @@ class HTTPRepository(CachedRepository):
first_wheel
) or self._get_info_from_wheel(first_wheel)
+ if len(sdists) == 0:
+ raise PackageNotFound(f"Neither a wheel nor a sdist could be found from {links!r}")
+
return self._get_info_from_metadata(sdists[0]) or self._get_info_from_sdist(
sdists[0]
)
I also have the same issue, with all packages that I try to upgrade/add. Installing from toml worked fine.
@charles-dyfis-net thanks, the patched worked! I also tried downgrading down to 1.8.1, but that didn't work. Why not make it into a PR?
Ran into this issue with poetry add langgraph@0.2.31
using Poetry 1.8.3
. @charles-dyfis-net patch worked for me. I'm surprised more people are not encountering/reporting this issue.
I encountered the same with isodate==0.7.0
(which got yanked yesterday).
Description
It seems that installing a yanked package with no dependency raises the error "List index out of range".
In particular, when using a default pyproject.toml file and executing the command:
poetry add PySimpleGui==4.60.5
corresponding to a yanked version, this raises the error "List index out of range" (full traceback in the appropriate section).This however does not seem to be an issue when installing a yanked package:
poetry add black==21.11b0
works with no error and the warning:or when installing a package with no dependencies:
poetry add nodeps==0.3.3
, which also works with no error.This is why i am guessing the error only affects yanked packages with no dependency, although there might a be a different reason for this error.
Moreover installation of PySimpleGui version 4.60.5 with pip seems to work: in the created virtualenv, command
pip install PySimpleGui==4.60.5
installs PySimpleGui with the warningWorkarounds
Not known.
Poetry Installation Method
system package manager (eg: dnf, apt etc.)
Operating System
Arch Linux
Poetry Version
Poetry (version 1.8.3)
Poetry Configuration
Python Sysconfig
Example pyproject.toml
Poetry Runtime Logs