-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Python interpreter not being recognized "No Python interpreter is selected" (JSON parsing fail) #9484
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
Comments
This problem is not present in 2019.11.50794 which I just reverted to. It appears to have been introduced in the latest version a few days ago. Failure to parse the interpreter json means that the debugger and other things aren't working either. |
Actually the JSON it returns is We're reverting |
dang... I've been looking for a fix for this issue for days. This is a very crucial bug for Python developers |
It was happening every time, persisting across multiple restarts of code, reinstalling language server, reinstalling Python extension, etc. (I'm now running the old extension) It does say it timed out but it also says Thanks for the response and quick reversion. |
JSON parser does not expect Unfortunately I am not able to reproduce this on Windows. i will try it on Linux and will get back to you. |
Yeah, I can't explain the -, when I run:
on the command line which is what it looks like it was doing, I don't see any dashes. I get back: maybe it's the |
I see where you're confused. Command line returns the arguments just fine. But when the extension is doing that it's returning |
Ah,ha! I see! So while it works in the command line, for some reason that command is not correctly generating the JSON inside of VS Code, instead it is timing out. So the JSON parser tries to parse a string, and dies. |
Exactly. Unfortunately, I am not able to see why it times out in the extension while it does not when you run the command manually. |
Can you see if the latest version of the extension fixes the issue for you? |
The problem went away with the last python extension update. I assumed the conda run reversion solved it. |
Great. As the original issue is not reproducible, I am closing this in favor of #9490. |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): language serverExpected behaviour
VS Code to recognize Python 3.7.2 from its location in /opt/miniconda/bin as it has always done
Actual behaviour
GUI and console claim that no interpreter selected. Debugger doesn't seem to run correctly.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)I can type
conda run -n base python ~/.vscode/extensions/ms-python.python-2020.1.57204/pythonFiles/interpreterInfo.py
on the command line and it returns:{"versionInfo": [3, 7, 2, "final"], "sysPrefix": "/opt/miniconda", "version": "3.7.2 (default, Dec 29 2018, 06:19:36) \n[GCC 7.3.0]", "is64Bit": true}
so I'm not sure why that's problematic JSON.
The text was updated successfully, but these errors were encountered: