You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid message: Found duplicate in "env": PATH when using virtual environment in Python 3.11 #20828
I get this error "Invalid message: Found duplicate in "env": PATH." when I use a Virtual environment to debug python code, but when I switch to the global python interpreter it works fine.
Extension version: 2023.5.10681722
VS Code version: Code - Insiders 1.77.0-insider (b60db78, 2023-03-10T05:24:23.805Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes
Reacted by James Duley, Eric Porter, Sergei Epifanov, Ermakov V.N., Nathan, Ben Nutchanon Ninyawee, David Feinzimer, Henrik Heimbuerger, Koral Hassan and Makarov Andrey
Here's the output after debugging:
DAP Server launched with command: c:\Users{user}\Projects\python\simpleApp\venv\Scripts\python.exe c:\Users{user}.vscode-insiders\extensions\ms-python.python-2023.5.10681722\pythonFiles\lib\python\debugpy\adapter
Please provide the debug logs, set python.logging.level to debug in User settings, reload window, then perform the steps to reproduce before providing the logs.
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Activity
karrtikr commentedon Mar 10, 2023
Can you use
Python: Report Issuecommand instead, it auto-fills many of the details we need? Other than that:launch.jsonconfig you're trying to debug with.Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Youssefbenhammouda commentedon Mar 10, 2023
Here's the output after debugging:
DAP Server launched with command: c:\Users{user}\Projects\python\simpleApp\venv\Scripts\python.exe c:\Users{user}.vscode-insiders\extensions\ms-python.python-2023.5.10681722\pythonFiles\lib\python\debugpy\adapter
karrtikr commentedon Mar 10, 2023
Please provide the debug logs, set
python.logging.leveltodebugin User settings, reload window, then perform the steps to reproduce before providing the logs.Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)karrtikr commentedon Mar 10, 2023
Perhaps
.envfile or some other file is sending thePATHvariable.bersbersbers commentedon Mar 30, 2023
Same issue here with v1.77.0 and v2023.6.0.
bersbersbers commentedon Mar 30, 2023
My launch config:
{ "name": "project", "type": "python", "purpose": [ "debug-in-terminal", // https://github.com/microsoft/vscode-python/issues/19030 // "debug-test", ], "request": "launch", "program": "project/project.py", "args": [ ], // Comment out to inspect additional output "console": "internalConsole", "justMyCode": false, },Removing
"console": "internalConsole"fixes the symptoms of the issue.karrtikr commentedon Mar 30, 2023
Do you have a
.envfile somewhere specifying additional env vars? Please mention the contents if so.pppmlt commentedon Mar 31, 2023
I have the same issue since the latest update.. Without
"console": "internalConsole"the code runs fine (but not in internal console).launch.json
vscode
svenmk commentedon Mar 31, 2023
The same here. Everything worked nicely. Just updated this morning, now I'm getting the error when debugging tests. Without debugging, they run.
I'm not having any
.envfile in my project dir.{ "version": "0.2.0", "configurations": [ { "name": "Python: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "justMyCode": true }, { "name": "Debug Unit Test", "type": "python", "request": "test", "justMyCode": true, "env": { "PYTEST_ADDOPTS": "--no-cov", } } ] }33 remaining items
karrtikr commentedon Apr 11, 2023
javiermtl Downgrading should be no longer needed, try pre-release mentioned in #20828.
javiermtl commentedon Apr 11, 2023
Thanks, Kartik Raj (@karrtikr), it worked for me :)
svenmk commentedon Apr 12, 2023
I can confirm that the problem is solved for me in the Pre-Release version. Thank you!
TcDhlPro commentedon Apr 12, 2023
Me Too!
AlexCaranha commentedon Apr 14, 2023
Thanks, it worked for me.
ppmarkus commentedon Apr 14, 2023
Thanks kartik. Works well now.
karrtikr commentedon Apr 14, 2023
Thanks everyone for confirming, we'll release a stable version with the fix very soon.
Fix debugging when using "internalConsole" (#21033)
Fix debugging when using "internalConsole" (#21068)
Merged PR posit-dev/positron-python#87: Merge latest upstream after R…
Merged PR posit-dev/positron-python#87: Merge latest upstream after R…