Getting the following error after installing pylance
Sorry, something went wrong activating IntelliCode support for Python. Please check the "Python" and "VS IntelliCode" output windows for details.
Version: 1.46.1
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:17:14.222Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0
python 3.8.2
macos catalina
Language server is set to Pylance.
Acquiring model
Acquiring model 'intellisense-members-lstm' for python
Querying IntelliCode service for available models.
vs-intellicode-python was passed a model: {}.
Cached model is up to date.
Activating Python extension
Language server extension command failed. Exception: Error: command 'python.intellicode.loadLanguageServerExtension' not found
at e._tryExecuteCommand (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3900:893)
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3900:774
at runMicrotasks (
at processTicksAndRejections (internal/process/task_queues.js:85:5)
Error while activating Python: {}
Not getting any errors.
Sorry, something went wrong activating IntelliCode support for Python. Please check the "Python" and "VS IntelliCode" output windows for details.
This may happen when IntelliCode (1.2.9+) sends command to Pylance while Pylance is not loaded. IntelliCode checks for
"python.languageServer": "Pylance"
Have you seen it once, such as right after install of Pylance (and reload window perhaps helped) or is it consistent?
No, I see this constantly.
Tried to disable Intellicode, but when re-enable, I get the error message again as soon as I open .py file.
I'm also constantly getting the same message, with the following output from VS Intellicode:
Language server is set to Pylance.
Acquiring model
Acquiring model 'intellisense-members-lstm' for python
Querying IntelliCode service for available models.
vs-intellicode-python was passed a model: {}.
Cached model is up to date.
Activating Python extension
Language server extension command failed. Exception: Error: command 'python.intellicode.loadLanguageServerExtension' not found
at u._tryExecuteCommand (file:///usr/lib/code/out/vs/workbench/workbench.desktop.main.js:3943:836)
at file:///usr/lib/code/out/vs/workbench/workbench.desktop.main.js:3943:717
at processTicksAndRejections (internal/process/task_queues.js:85:5)
Error while activating Python: {}
on Arch Linux with Python 3.8.3 and code 1.47.0.
Same problem here, and the settings editor is not accepting "Pylance" as a valid value for "python.languageServer":
Value is not accepted. Valid values: "Jedi", "Microsoft", "None".
This is with the Pylance extension installed and enabled. i tried uninstalling and reinstalling Pylance but it's the same situation.
Ubuntu 20.04, code 1.47.1
Same problem here, and the settings editor is not accepting "Pylance" as a valid value for "python.languageServer":
Value is not accepted. Valid values: "Jedi", "Microsoft", "None".This is with the Pylance extension installed and enabled. i tried uninstalling and reinstalling Pylance but it's the same situation.
Ubuntu 20.04, code 1.47.1
I also get the same error in the settings. However, in another issue I found a mention that this is expected and does not affect the functioning of Pylance, and I can confirm Pyright type checking still works despite this error. I belive this error is not related to the issues with IntelliCode support.
I can report the same issue here:
IntelliCode Output
Language server is set to Pylance.
Acquiring model
Acquiring model 'intellisense-members-lstm' for python
Querying IntelliCode service for available models.
vs-intellicode-python was passed a model: {}.
Cached model is up to date.
Activating Python extension
Language server extension command failed. Exception: Error: command 'python.intellicode.loadLanguageServerExtension' not found
at u._tryExecuteCommand (file:///usr/lib/code/out/vs/workbench/workbench.desktop.main.js:3943:836)
at file:///usr/lib/code/out/vs/workbench/workbench.desktop.main.js:3943:717
at processTicksAndRejections (internal/process/task_queues.js:85:5)
Error while activating Python: {}
Python output
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - control'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'RunByLine - control'
User belongs to experiment group 'CustomEditorSupport - control'
User belongs to experiment group 'pythonaacf'
> conda --version
> pyenv root
> python3.7 ~/.vscode-oss/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3.6 ~/.vscode-oss/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3 ~/.vscode-oss/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python2 ~/.vscode-oss/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode-oss/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode-oss/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> conda info --json
> python ~/.vscode-oss/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode-oss/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> pyenv root
Error 2020-07-27 09:51:07: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file '/home/crisbal/.config/Code/User/settings.json' (EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, open '/home/crisbal/.config/Code/User/settings.json')
at _handleError (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:657:25)
at async v.readText (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:1:571666)
at async p.doesFileNeedToBeFixed (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:48:932592)
at async /home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:48:931719
at async Promise.all (index 0)
at async p.getFilesToBeFixed (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:48:931665)
at async p.updateTestSettings (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:48:931292)] {
code: 'FileNotFound',
name: 'EntryNotFound (FileSystemError)'
}
Error 2020-07-27 09:51:07: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file '/home/crisbal/my-project/.vscode/settings.json' (EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, open '/home/crisbal/my-project/.vscode/settings.json')
at _handleError (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:657:25)
at async v.readText (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:1:571666)
at async p.doesFileNeedToBeFixed (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:48:932592)
at async /home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:48:931719
at async Promise.all (index 1)
at async p.getFilesToBeFixed (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:48:931665)
at async p.updateTestSettings (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:48:931292)] {
code: 'FileNotFound',
name: 'EntryNotFound (FileSystemError)'
}
Starting Pylance language server.
Python interpreter path: ./venv/bin/python3
Error 2020-07-27 09:51:08: Failed to ensure language server is available, Class name = f, completed in 25ms, has a falsy return value, Arg 1: <Uri:/home/crisbal/my-project/deploy.py>, Return Value: undefined [Error: You may only use the Pylance extension with Visual Studio Code, Visual Studio or Xamarin Studio software
to help you develop and test your applications.
The software is licensed, not sold.
This agreement only gives you some rights to use the software.
Microsoft reserves all other rights
You may not work around any technical limitations in the software;
reverse engineer, decompile or disassemble the software
remove, minimize, block or modify any notices of Microsoft or
its suppliers in the software share, publish, rent, or lease
the software, or provide the software as a stand-alone hosted as solution for others to use.
at /home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:21232
at /home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:21251
at Generator.next (<anonymous>)
at /home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:19316
at new Promise (<anonymous>)
at _0x518249 (/home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:18652)
at _0x12e4ff.<computed> (/home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:19811)
at Function._callActivateOptional (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:837:509)
at Function._callActivate (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:837:160)
at /usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:835:703
at async Promise.all (index 0)
at async g.languageServerFolder (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:46:187483)
at async getLanguageServerFolderName (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:46:186977)
at async f.ensureLanguageServerFileIsAvailable (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:24:27637)
at async f.ensureLanguageServerIsAvailable (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:46:183035)]
Starting Pylance language server.
Error 2020-07-27 09:51:08: Failed to activate language server, Class name = l, completed in 28ms, has a falsy return value, Arg 1: <Uri:/home/crisbal/my-project/deploy.py>, Arg 2: {"architecture":3,"path":"/home/crisbal/my-project/venv/bin/python3","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.8.3-final","major":3,"minor":8,"patch":3,"prerelease":["final"],"build":[],"version":"3.8.3-final"},"sysPrefix":"/home/crisbal/my-project/venv","fileHash":"56fabe1e1884fe56fd726ffdb7183b182fb4c229d156a6608aba7f18557206563b704e72259f61da12082dbfd465906dd9396b7dead44626a6db6dc97a49aede","type":"Venv","envName":"venv","displayName":"Python 3.8.3 64-bit ('venv': venv)"}, Return Value: undefined [Error: You may only use the Pylance extension with Visual Studio Code, Visual Studio or Xamarin Studio software
to help you develop and test your applications.
The software is licensed, not sold.
This agreement only gives you some rights to use the software.
Microsoft reserves all other rights
You may not work around any technical limitations in the software;
reverse engineer, decompile or disassemble the software
remove, minimize, block or modify any notices of Microsoft or
its suppliers in the software share, publish, rent, or lease
the software, or provide the software as a stand-alone hosted as solution for others to use.
at /home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:21232
at /home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:21251
at Generator.next (<anonymous>)
at /home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:19316
at new Promise (<anonymous>)
at _0x518249 (/home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:18652)
at _0x12e4ff.<computed> (/home/crisbal/.vscode-oss/extensions/ms-python.vscode-pylance-2020.7.3/dist/extension.js:1:19811)
at Function._callActivateOptional (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:837:509)
at Function._callActivate (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:837:160)
at /usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:835:703
at async Promise.all (index 0)
at async g.languageServerFolder (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:46:187483)
at async getLanguageServerFolderName (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:46:186977)
at async f.ensureLanguageServerFileIsAvailable (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:24:27637)
at async f.ensureLanguageServerIsAvailable (/home/crisbal/.vscode-oss/extensions/ms-python.python-2020.7.96456/out/client/extension.js:46:183035)]
My setup:
@crisbal Your issue is different; as the python output is stating, Pylance is only available in the official VS Code builds. https://github.com/microsoft/pylance-release/issues/135#issuecomment-662607952
(On Arch, you can build a package with visual-studio-code-bin in the AUR; that's what I do.)
@vvvlad and @mvaaltola - are you still seeing the issue? We've made some improvements so I am wondering if they worked for you. They should be at least in insiders channel.
I also get the same error in the settings. However, in another issue I found a mention that this is expected and does not affect the functioning of Pylance, and I can confirm Pyright type checking still works despite this error. I belive this error is not related to the issues with IntelliCode support.
@mvaaltola thank you - i see issue https://github.com/microsoft/pylance-release/issues/16 now
@MikhailArkhipov still having this issue after updating to Code 1.47.3.
Just to be clear @mvaaltola, you are using an official build of VS Code, correct? And not one built from scratch? "Code" sounds like an unofficial build, and Pylance doesn't work on those.
@mvaaltola - the change is in insiders build of Python extension. Try setting this to daily so you'd get latest extension


I am having the same problem, and I don't think it's PyLance related. I flipped to daily insiders build as suggested by @MikhailArkhipov and also uninstalled PyLance. Neither fixed it...
Language server extension command failed. Exception: Error: command 'python.intellicode.loadLanguageServerExtension' not found is absolutely Pylance related since Pylance exposes the command. When Pylance is not installed then command will definitely fail. If Pylance is installed, but this happens it means Pylance hasn't started by the time IntelliCode sends the command.
So, what is the IntelliCode output with insiders daily + Pylance?
Just a quick update. I tried installing the latest Visual Studio Code insiders with the Python, Pylance, and IntelliCode extensions, and setting "python.languageServer": "Pylance". No errors are displayed when opening a Python project.
I suspect the original issue may at least for me be related to an "unofficial" build as @jakebailey suggested. I'm running "Code - OSS" from the community/code package from the Arch Linux repository. Type checking and other Pylance features seem to work OK on that version, only thing causing an error is IntelliCode.
@mvaaltola - so, you are running latest

ans still get the intellicode error?
@MikhailArkhipov ah, perhaps I should've been a bit more clear. I get no errors on the latest official VS Code Insiders with freshly installed Python, Pylance and IntelliCode plugins, everything seems to work fine.
I only get the error on my main "Code - OSS" build with the latest Pylance and Python extensions. They're not daily builds (can't seem to install them on my vscode build), but neither was the version I tried on the insiders build. I assume the error has something to do with the "Code - OSS" build not being officially supported by Pylance.
Yes, that might be the case.
OK, I am going to close the issue since Pylance works with stock VS Code. Other builds are not supported and Python extension most probably falls back to Jedi language support which is not compatible with IntelliCode.
Ive started getting this error as well. Ive tried deleting pylance, python, and intellicode extensions a couple of times. Are their other ideas to solve this issue?
same with joshuamwolfe
@longer-is-better The above user opened #1118 to cover their issue; if yours is the same we can comment there, otherwise this is an old unrelated issue and we'd appreciate a new one instead.
Most helpful comment
Same problem here, and the settings editor is not accepting "Pylance" as a valid value for "python.languageServer":
This is with the Pylance extension installed and enabled. i tried uninstalling and reinstalling Pylance but it's the same situation.
Ubuntu 20.04, code 1.47.1