-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
List index out of range when installing yanked package with no dependency #9505
Comments
It's happening the same to me when trying to execute |
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 |
I encountered the same with |
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. |
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
The text was updated successfully, but these errors were encountered: