-
-
Notifications
You must be signed in to change notification settings - Fork 14
Virtualenv gets deleted when I enable Poetry plugin #160
Comments
I noticed that Poetry has some built-in "broken virtualenv detection", which I can trigger manually by deleting
Since I also have poetry installed within the virtualenv, it may fail to re-create itself after deleting. |
I also tried deleting and re-creating the IDEA Python plugin interpreter configuration, but the problem persists. |
@intgr
No. We can't save logs of the commands. We may add a feature to get logs. I tested it on my environment close to your environment. My environment
I don't recommend to install poetry within the virtualenv. |
Yeah I would very much like to get rid of it, but it's currently a necessary workaround for us until this PR goes anywhere: python-poetry/poetry#3349 |
I can confirm this is an issue for me. It makes the plugin totally unusable. I install a virtualenv, and within seconds it gets auto-deleted:
I believe it's the auto-dispose of the python interpreter that's doing the crime here. Environment: |
I reinstalled plugin version 1.0.1 and verified that the auto-dispose of the python interpreter does not happen with the plugin enabled. |
This is biting me now too!
Any advice or recommendation would be greatly appreciated! |
I seem to be able to hit this consistently by removing the python interpreter from PyCharm (I've confirmed that removing the interpreter from PyCharm doesn't touch the directory on disk), and then re-adding it. The deletion appears to occur once I hit "OK" and during the "Loading Packages L..." phase that I see along the bottom of the PyCharm window. Going from 1.0.6, all the way down to 1.0.0, I was still able to consistently reproduce this issue. I've also confirmed that this seems to just be affected by the Poetry plugin. If I add the same interpreter as a "Virtualenv Environment", I don't see the same behavior. |
@wgordon17
I just checked the histories of changes. |
Weird! Is there any way to enable debugging or audit logging in PyCharm? I'm happy to provide any additional information if necessary! |
Thank you. The simple answer is nothing :( Would you tell me how do you reproduce it? My environment |
This might be a complete red herring, but the other problem that was driving me crazy was JCEF crashing with the ReStructuredText plugin enabled due to problems accessing the GPU. I solved that by using the system java rather than bundled; I believe that may have solved the this problem, but I'm not in a situation to test this atm. |
Thank you for the comment. |
@sproshev In the latest version, I had added some features to checking poetry executable. |
I hope this helps https://www.youtube.com/watch?v=Xt5WEfaYzrA I'm really not sure where the issue is ¯\_(ツ)_/¯ At first, I was totally clueless, so then I used Once I realized it was PyCharm I updated to 2020.3.4. And finally, at my whits end, I stumbled across this issue. I honestly don't recall this being an issue in the past, but then again, how often does someone switch out there Project Interpreter. It definitely seems to be an issue with older versions of your Poetry plugin, but whether it's an interaction with newer versions of PyCharm...who the heck knows ¯\_(ツ)_/¯ I'm at least back to productive again using the "Virtualenv Environment" interpreter, but I definitely miss your plugin's "magic" ;) |
@wgordon17 |
@koxudaxi we have a similar issue with pipenv https://youtrack.jetbrains.com/issue/PY-36526 but I'm not sure if it is actually related. |
@sproshev |
The behaviour described in here started happening for me today, out of the blue. A poetry install from the command line resets the environment but as soon as I open pycharm, it get's deleted. A workaround that has worked so far is to re-create the poetry env from within pycharm. It survived a re-start. Peotry Pycharm Plugin version: 1.1.4 Poetry version 1.1.6 Pycharm Version Runtime version: 11.0.11+9-b1341.57 amd64 |
Also ran into this today. Thanks to @svenski this workaround worked!
Allowing Pycharm to create the Poetry venv allowed me to utilize poetry from both Pycharm and the command line (e.g.
|
Describe the bug
Whenever I start IDEA with the Poetry plugin enabled, it starts indexing the virtualenv and within seconds the whole $VIRTUAL_ENV directory gets completely removed. No new virtualenv is created in its place. This only occurs in one project though.
This started occurring in within the last week, I performed a 'brew update' and update to IDEA plugins. Until then I had been using the Poetry plugin without issues.
Disabling the Poetry plugin solves this issue.
I am not sure how to debug this further, nothing relevant appears in
idea.log
file. Is it possible to log all commands that the Poetry plugin invokes?Environments (please complete the following information):
The text was updated successfully, but these errors were encountered: