Skip to content
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

Python intepreters forgotten, ALWAYS have to set path after restart/reload. #15827

Closed
ewerybody opened this issue Apr 1, 2021 · 3 comments
Closed
Assignees
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@ewerybody
Copy link

Issue Type: Bug

Since a couple days I have this behavior that ALL once set interpreters were forgotten. I have to set them up each time I restart/reload window (I don't do that so often, yes 1 or 2 times a day is not severe. But ....)
It tells me that my debug configuration would be invalid... but that's just standard! See:

my launch.json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}

The Status Bar Python interpreter still shows the valid last choice but when I click it the palette thing still shows Current: .\python\python39\python.exe (which is correct!) but the selection in completely empty. The only item left is "Enter interpreter path...". It's not even seeing the multiple installed system interpreters (#15458 ?)
And after I DO point it to an interpreter it's all working well! And the Status Bar thing shows EXACTLY the same as before.

I was poking around a bit more and in the Output > Python panel there is some interesting stuff:

Output Python
User belongs to experiment group 'pythonaa'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonSendEntireLineToREPL'
User belongs to experiment group 'pythonNotDisplayLinterPrompt'
User belongs to experiment group 'pythonDiscoveryModule'
User belongs to experiment group 'pythonFindInterpretercf'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'CollectLSRequestTiming - control'
Python interpreter path: .\python\python39\python.exe
Starting Pylance language server.
Error 2021-04-01 12:33:58: Failed to activate a workspace, Class name = y, completed in 1006ms, has a falsy return value, Arg 1: <Uri:c:\Users\techarteric\work\st_main\python\lib\common\crypy\test\test_settings.py>, Return Value: undefined [Error: invalid version -final
	at Object.u [as parseBasicVersion] (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:9:198256)
	at V (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:37379)
	at q.getInterpreterDetails (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:38849)
	at processTicksAndRejections (internal/process/task_queues.js:97:5)
	at async C.getInterpreterDetails (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:741545)
	at async b.diagnose (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:268434)
	at async c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253203
	at async Promise.all (index 0)
	at async h.runDiagnostics (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253161)
	at async h.performPreStartupHealthCheck (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253005)
	at async y.activateWorkspace (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:52:25163)]
Error 2021-04-01 12:33:58: Failure during activation. [Error: invalid version -final
	at Object.u [as parseBasicVersion] (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:9:198256)
	at V (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:37379)
	at q.getInterpreterDetails (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:38849)
	at processTicksAndRejections (internal/process/task_queues.js:97:5)
	at async C.getInterpreterDetails (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:741545)
	at async b.diagnose (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:268434)
	at async c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253203
	at async Promise.all (index 0)
	at async h.runDiagnostics (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253161)
	at async h.performPreStartupHealthCheck (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253005)
	at async y.activateWorkspace (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:52:25163)]
Error 2021-04-01 12:33:58: sendStartupTelemetry() failed. [Error: invalid version -final
	at Object.u [as parseBasicVersion] (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:9:198256)
	at V (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:37379)
	at q.getInterpreterDetails (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:38849)
	at processTicksAndRejections (internal/process/task_queues.js:97:5)
	at async C.getInterpreterDetails (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:741545)
	at async b.diagnose (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:268434)
	at async c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253203
	at async Promise.all (index 0)
	at async h.runDiagnostics (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253161)
	at async h.performPreStartupHealthCheck (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:253005)
	at async y.activateWorkspace (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:52:25163)]
Error 2021-04-01 12:33:58: Fetching environments via the new API failed [Error: invalid version -final
	at Object.u [as parseBasicVersion] (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:9:198256)
	at V (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:37379)
	at Array.map (<anonymous>)
	at q.getInterpretersViaAPI (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:39997)
	at processTicksAndRejections (internal/process/task_queues.js:97:5)
	at async q.getInterpreters (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:80:39311)
	at async C.getInterpreters (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:740434)
	at async p.onAutoSelectInterpreter (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:61:705770)
	at async p.autoSelectInterpreter (c:\Users\techarteric\.vscode\extensions\ms-python.python-2021.3.680753044\out\client\extension.js:9:280746)]
Error 2021-04-01 12:34:16: Invalid Python Path 'c:\Users\techarteric\work\st_main\python\python39\python.exe'

This last line:

Error 2021-04-01 12:34:16: Invalid Python Path 'c:\Users\techarteric\work\st_main\python\python39\python.exe'

This path is not invalid! And it's exactly the path I'd set the interpreter to. 🤷‍♀️ you know .. the one that's working.

repro:

• Start up VS Code (Or just Developer: Reload Window)
• hit Run

The Python path in your debug configuration is invalid. (Source: Python (Extension))

• Enter Interpreter Path ...
• Run works, works, works, works...
• goto step 1 ...

Extension version: 2021.3.680753044
VS Code version: Code 1.55.0 (c185983a683d14c396952dd432459097bc7f757f, 2021-03-30T16:01:55.261Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.74GB (10.57GB free)
Process Argv --crash-reporter-id acdf514f-7def-4641-88b6-fa6e0a8d7631
Screen Reader no
VM 0%
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 1, 2021
@karthiknadig karthiknadig added area-debugging triage bug Issue identified by VS Code Team member as probable bug and removed triage-needed Needs assignment to the proper sub-team labels Apr 1, 2021
@paulacamargo25
Copy link

Thanks for the bug report! We just wanted to quickly acknowledge we received it and we will triage this as soon as we can.

@paulacamargo25
Copy link

hi @ewerybody , sorry for the delay, we released some fixes related the environment issue. Can you install the latest version and see if you still has the error?

@ewerybody
Copy link
Author

I'm always on the latest versions 🤓
The issue seems solved 👍

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants