Skip to content
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

"poetry install" fails if corrupted package installed #4333

Closed
3 tasks done
Conchylicultor opened this issue Jul 30, 2021 · 2 comments
Closed
3 tasks done

"poetry install" fails if corrupted package installed #4333

Conchylicultor opened this issue Jul 30, 2021 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@Conchylicultor
Copy link

Conchylicultor commented Jul 30, 2021

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: MacOS

  • Poetry version: 1.2.0a

Issue

I have a dummy poetry file:

[tool.poetry]
name = "my_project"
version = "0.1.0"
description = "Poetry plugin to setup automated release"
authors = ["Sunds team <sunds@google.com>"]

[tool.poetry.dependencies]
python = "^3.7"

I'm trying to install this file globally (as this is a poetry plugin)

poetry config virtualenvs.create false
poetry install

However this fail with:

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/poetry/core/version/pep440/parser.py:67

 InvalidVersion

  Invalid PEP 440 version: '3.2.1-nightly'

Full stacktrace: https://gist.github.com/Conchylicultor/d868433147613a1e9cd89d0d15f6b107

I'm quite confused by this error. I'm prevented of installing my project even though my configuration file is perfectly valid.

The error is also very much not explicit. I had to manually modify the poetry source code to find out which package was responsible for this error. (It was some package installed with pip install -e).

Somehow I think poetry try to parse the package installed on my system. I checked with pip freeze that no package has 3.2.1 version (https://gist.github.com/Conchylicultor/a0922af93f734de3368208f9044536ee).

Looking at other github issue (#4176), it seems that I'm not the first to have similar issue. Like pip, poetry should ignore non-standard packages, rather than failing. Or at minima raise more explicit error messages.

@Conchylicultor Conchylicultor added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jul 30, 2021
@Conchylicultor Conchylicultor changed the title Imposible to run "poetry install" "poetry install" fails if corrupted package installed Aug 2, 2021
@finswimmer
Copy link
Member

Hello @Conchylicultor,

this is duplicate of #4022

fin swimmer

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants