Repository navigation
Python interpreter not being recognized "No Python interpreter is selected" (JSON parsing fail) #9484
Description
Activity
- addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-teambugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
on Jan 9, 2020 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.
- ghost removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Jan 9, 2020 Actually the JSON it returns is
--timed out--, which is why parsing JSON failed. Can you always reproduce it, or does it times out only sometimes?We're reverting
conda run#9490 so this should be fixed by Monday.Reacted by dev-mbusch- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jan 10, 2020 dang... I've been looking for a fix for this issue for days. This is a very crucial bug for Python developers
Reacted by Ankit ShahActually the JSON it returns is
--timed out--, which is why parsing JSON failed. Can you always reproduce it, or does it times out only sometimes?We're reverting
conda run#9490 so this should be fixed by Monday.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
Unexpected number in JSON at position 1?Thanks for the response and quick reversion.
- removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jan 10, 2020 JSON parser does not expect
-at the start of the JSON string which results in the error of syntax at position 1 is incorrect.Unfortunately I am not able to reproduce this on Windows. i will try it on Linux and will get back to you.
JSON parser does not expect
-at the start of the JSON string which results in the error of syntax at position 1 is incorrect.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:
conda run -n base python ~/.vscode/extensions/ms-python.python-2020.1.57204/pythonFiles/interpreterInfo.pyon the command line which is what it looks like it was doing, I don't see any dashes. I get back:
{"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}maybe it's the
\n?I see where you're confused. Command line returns the arguments just fine. But when the extension is doing that it's returning
--timed out--instead of the JSON you just pasted, which is where-is coming from.Reacted by Marcos HuertaAh,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?
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jan 20, 2020 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.
- locked as resolved and limited conversation to collaborators
on Jan 28, 2020
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
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Output from
Consoleunder theDeveloper Toolspanel (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.pyon 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.