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

Invalid virtual environment detected because of escape sequences and colors (ANSICON env variable defined)

eblis opened this issue · comments

commented

Describe the bug
The IDEA plugin doesn't correctly identify the Poetry environment.

I have forced poetry to run in ANSI mode on my Windows 10 machine by creating the ANSICON environment variable, this is probably forcing poetry to report the virtual environment using colors and escape sequences which are not removed by the plugin, resulting in an invalid folder being identified as the poetry environment in use.

Expected behavior
Poetry environment should be successfully identified

Screenshots
The first one is my manual selection, the red one is the one automatically detected
image

commented

I think you can get rid of this problem if you always call the poetry executable with the --no-ansi argument

@eblis
I answered in the issue.
#289 (comment)