-
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
"env use" fails with "NameError: name 'PosixPath' is not defined" #2711
Comments
@elferia appreciate the bug report and the analysis. As you have already identified, the preview version will resolve this. And since we recently released the last |
I had the same issue, upgrading to the latest preview version fixed it for me - thanks!
|
Thanks @alexlouden I had to do : Since my poetry installation gave me this warning: |
Thanks @tony if you're using or upgrade exisiting one |
Upstream bug: python-poetry/poetry#2711
MacOS builds fail due to python-poetry/poetry#2711
I had to use this instead: |
Still running into this issue when doing |
Isn't there a chance to get a patch release for this bug for the 1.0 line? Seems a few dependencies still block upgrading things like the archlinux package and user there are then stuck with this broken version. |
@abn Hi there! I got a a question (echo'ing) @languitar at #2711 (comment) Is there any way around this upgrading to 1.1 (I can't do that - I have projects depending on 1.0 and it's the team's choice whether poetry upgrades, the lockfiles aren't compatible to my knowledge between 1.0 and 1.1) Is this something that could be backported into 1.0? (I am on 1.0.10) What was the fix for this in 1.1? Is it a trivial one? I don't believe it's solved by 5487069, which is in 1.0.10, since I still get the issue. The PR at #2742 doesn't specify what change fixed it in 1.1 at the time Any workarounds aside from upgrading anyone know of? This sorta breaks my setup. |
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. |
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: Ubuntu 18.04.4 LTS
Poetry version: 1.0.10
Issue
When I try the following command,
it will fail with the following message:
I guess this is caused by the following line.
poetry/poetry/utils/env.py
Line 625 in d3c9049
Variable
venv
is aPath
object, and it is finally passed tostr.format()
poetry/poetry/utils/env.py
Line 672 in d3c9049
Then
CREATE_VENV_COMMAND
ispoetry/poetry/utils/env.py
Lines 105 to 106 in d3c9049
So the interpreter will first read a line like
path = PosixPath('...')
butPosixPath
is not defined.I think this bug is introduced in 1.0.10 5487069
I guess it will be fixed by replacing
venv
tostr(venv)
so I tried to fix, but the commit above is replacingstr(venv)
tovenv
and I can't understand the purpose to do so. I can't fix it.Thanks.
The text was updated successfully, but these errors were encountered: