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

Unhelpful/wrong error message #2054

Closed
nicolas-leydet opened this issue Feb 18, 2020 · 2 comments
Closed

Unhelpful/wrong error message #2054

nicolas-leydet opened this issue Feb 18, 2020 · 2 comments
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected

Comments

@nicolas-leydet
Copy link

On Poetry version 1.0.3

Steps to reproduce:

mktmpenv -p python3.7
pip install poetry
poetry init
poetry add fluent-logger

Error message:

Using version ^0.9.4 for fluent-logger

Updating dependencies
Resolving dependencies... (0.0s)

[SolverProblemError]
The current project's Python requirement (^3.7) is not compatible with some of the required packages Python requirement:
  - fluent-logger requires Python >=2.7,!=3.0,!=3.1,!=3.2,!=3.3,<3.9

Because no versions of fluent-logger match >0.9.4,<0.10.0
 and fluent-logger (0.9.4) requires Python >=2.7,!=3.0,!=3.1,!=3.2,!=3.3,<3.9, fluent-logger is forbidden.
So, because tmp-ef8119aac07c59ce depends on fluent-logger (^0.9.4), version solving failed.

The same error happens with python version 3.6 but not with 2.7
A classic pip install fluent-logger is installing the package without error

There's maybe an issue with fluent-logger but the message doesn't seem to describe the issue correctly.

@nicolas-leydet nicolas-leydet added the kind/bug Something isn't working as expected label Feb 18, 2020
@finswimmer finswimmer added the area/solver Related to the dependency resolver label Feb 18, 2020
@absassi
Copy link

absassi commented Mar 2, 2020

I have a similar issue with PySide2, which also limits itself to <3.9.

I had to set my Python dependency to match exactly the PySide2's Python dependency (which is also the intersection of all Python version constraints in my set of dependencies) to be able to resolve:

python = ">= 3.7, != 3.8.0, < 3.9"

One can argue that Poetry is correct, since ^3.7 includes Python versions >3.9,<4.0, for which there is no fluent-logger (or PySide2) available, so it can't really resolve them (for all allowed Python versions and platforms).

I agree the message could be more clear, stating the range of versions where the requirement fails, as I spend quite some time trying to figure out what was happening. Maybe Poetry should be clear in the error message and in the docs that dependency resolution must satisfy all allowed Python versions and platforms, and not just the currently selected environment.

Copy link

github-actions bot commented Mar 1, 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 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants