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 update failes when there is [[tool.poetry.source]] source #5637

Closed
3 tasks done
wiltso opened this issue May 18, 2022 · 9 comments
Closed
3 tasks done

$ poetry update failes when there is [[tool.poetry.source]] source #5637

wiltso opened this issue May 18, 2022 · 9 comments
Labels
status/duplicate Duplicate issues

Comments

@wiltso
Copy link

wiltso commented May 18, 2022

Issue

First here is the stack trace of the issue: https://gist.github.com/wiltso/f06c06987d199e440e1cd257b4fcdcb7

The error only happens when I there is [[tool.poetry.source]] in the pyproject.toml file. If I remove the source everything works fine.

@wiltso wiltso added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 18, 2022
@wiltso wiltso changed the title $ poetry update failes when $PYTHONPATH isn't set and there is [[tool.poetry.source]] source $ poetry update failes when there is [[tool.poetry.source]] source May 18, 2022
@abn
Copy link
Member

abn commented May 19, 2022

From what I can tell the issue is that name from a package already installed in your environment is not retrieved.

name = canonicalize_name(distribution.metadata["name"])

Maybe try recreating your venv?

@abn abn added status/waiting-on-response Waiting on response from author and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 19, 2022
@wiltso
Copy link
Author

wiltso commented May 19, 2022

I have done that both with python 3.9 and 3.10.

@abn
Copy link
Member

abn commented May 19, 2022

Can you post the full logs from command with -vvv please?

Also, is this any better with the version from master?

@wiltso
Copy link
Author

wiltso commented May 19, 2022

The -vvv output is in the original post.
I have not tried installed the master version.

@abn
Copy link
Member

abn commented May 19, 2022

Unless I'm missing something, you have only posted the stack trace. Or are you saying that is all you are getting?

@wiltso
Copy link
Author

wiltso commented May 19, 2022

Yea this "First here is the stack trace of the issue: https://gist.github.com/wiltso/f06c06987d199e440e1cd257b4fcdcb7" is the hole -vvv output

@abn
Copy link
Member

abn commented May 19, 2022

This is a duplicate of #3628 #4311 #3625. The root cause here seems to be stray installations (empty dist-info/egg-info) directories in site-packages of the virtual environment used by the project.

Unable to reproduce this issue in a clean environment.

podman run --rm -i --entrypoint bash docker.io/ubuntu:21.10 <<EOF
set -xe
export DEBIAN_FRONTEND=noninteractive
apt-get -yqq update
apt-get -yqq install python3 python3-pip curl
python3 -m pip install --disable-pip-version-check -q --pre poetry
poetry --version
install -d foobar
pushd foobar
curl -sL --output pyproject.toml https://gist.githubusercontent.com/wiltso/64f597cdb30dce0f61166efc84d2a781/raw/fdaedb6b2e1dd426d7ffc2d95a485b1b0786f3df/toml
poetry install
poetry update
EOF
console output:

+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
+ apt-get -yqq update
+ apt-get -yqq install python3 python3-pip curl
...
Processing triggers for libc-bin (2.34-0ubuntu3.2) ...
Processing triggers for ca-certificates (20210119ubuntu1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
+ python3 -m pip install --disable-pip-version-check -q --pre poetry
+ poetry --version
Poetry (version 1.2.0b1)
+ install -d foobar
/foobar /
+ pushd foobar
+ curl -sL --output pyproject.toml https://gist.githubusercontent.com/wiltso/64f597cdb30dce0f61166efc84d2a781/raw/fdaedb6b2e1dd426d7ffc2d95a485b1b0786f3df/toml
+ poetry install
Creating virtualenv testing-lWDpn5M1-py3.9 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...

Writing lock file
+ poetry update
Updating dependencies
Resolving dependencies...

@abn
Copy link
Member

abn commented May 19, 2022

Closing as a duplicate of #3628 as it has more information.

@abn abn closed this as completed May 19, 2022
@mkniewallner mkniewallner added status/duplicate Duplicate issues and removed status/waiting-on-response Waiting on response from author labels Jun 11, 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
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants