koxudaxi / poetry-pycharm-plugin

A PyCharm plugin for poetry

Home Page:https://koxudaxi.github.io/poetry-pycharm-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repair of Broken Env

DustinMoriarty opened this issue · comments

It is possible to get into an repairable state if the current interpreter is deleted. I found this while trying out the plugin and deciding to switch from in-project to not in-project.

Steps to reproduce:

  1. Configure poetry to use an in-project environment.
poetry config virtualenvs.in-project true
  1. Create interpreter using the plugin pointing to a pyenv base interpreter (e.g. ~/.pyenv/versions/3.6.10/bin/python).
  2. Delete the in project environment.
rm -r .venv
  1. Configure poetry to not use an in project environment.
poetry config --unset virtualenvs.in-project
  1. Try to recreate the environment using the plugin. The current environment is listed as invalid. However, the add python interpreter dialogue reads "Poetery (sic) interpreter has been already added, select ." Therefore, there is no way out of this state.

@DustinMoriarty
Thank you for creating this issue.
I confirmed your case.
I will fix it to re-use an interpreter when re-creating an environment.

@DustinMoriarty
I fixed and released the version as 0.0.8.
Would you please check it?

@koxudaxi
Sorry for the late reply. I will give it a try.

@koxudaxi
This issue is resolved. Great work!

Thanks for your feedback!
I close this issue.