Error starting Python extension under code-server
OS/Web Information
- Web Browser: Version 88.0.4324.182 (Developer Build) built on Debian bullseye/sid, running on Debian bullseye/sid (64-bit)
- Local OS: Debian testing, using code-server installed as a Progressive Web Application
- Remote OS: Arch Linux container image, running on Ubuntu host in GKE
- Remote Architecture: Coder Enterprise
code-server --version: 3.9.0-1 06c7e17674bd72c1bb655471a69e2f1a4244b329
Steps to Reproduce
- Install the official Python extension
- Open the Command Palette (Ctrl+Shift+P) and select "Python: Select Interpreter"
Expected
A list of interpreters should appear
Actual
An error stack is logged to the Log (Remote Extension) log:
[2021-03-18 15:33:45.481] [exthost] [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter {"startup":false,"extensionId":{"value":"ms-python.python","_lower":"ms-python.python"},"activationEvent":"onCommand:python.setInterpreter"}
[2021-03-18 15:33:45.481] [exthost] [info] ExtensionService#loadCommonJSModule file:///home/coder/.local/share/code-server/extensions/ms-toolsai.jupyter-2020.12.1/out/client/extension
[2021-03-18 15:33:45.482] [exthost] [error] Activating extension ms-toolsai.jupyter failed due to an error:
[2021-03-18 15:33:45.488] [exthost] [error] Error: Cannot find module '/home/coder/.local/share/code-server/extensions/ms-toolsai.jupyter-2020.12.1/out/client/extension'
Require stack:
- /opt/coder/code-server/lib/vscode/out/vs/loader.js
- /opt/coder/code-server/lib/vscode/out/bootstrap-amd.js
- /opt/coder/code-server/lib/vscode/out/bootstrap-fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Function.t._load (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1093:657)
at Function.i._load (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1062:334)
at Function.n._load (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1058:567)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Function.r [as __$__nodeRequire] (/opt/coder/code-server/lib/vscode/out/vs/loader.js:20:263)
at p._loadCommonJSModule (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1063:631)
at p._doActivateExtension (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:959:742)
at p._activateExtension (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:958:822)
at Object.actualActivateExtension (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:956:453)
at h._activateExtension (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:680:603)
at /opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:680:281
at Array.map (<anonymous>)
at h._activateExtensions (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:680:269)
at h._activateExtensions (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:680:338)
at h.activateByEvent (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:677:745)
at p._activateByEvent (/opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:957:300)
at /opt/coder/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:966:111
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Screenshot

Notes
This issue can be reproduced in VS Code: Yes/No
I don't have VSCode installed locally, and would prefer not to install it, sorry
This is possibly related to https://github.com/cdr/code-server/issues/2675 or https://github.com/microsoft/vscode-python/issues/14959. It may also be a limitation of Coder's internal extension marketplace
Fingers crossed this might be fixed. :crossed_fingers: https://github.com/cdr/code-server/issues/2341#issuecomment-801408467
I think this might be because the Python extension version we ship right now needs code-server 3.9.1/VSCode 1.53. Can you try on the latest version?
I think this might be because the Python extension version we ship right now needs code-server 3.9.1/VSCode 1.53.
Can you confirm context of "versoin"? Version of code-server or version of extension?
@ediphy-dcottrell I believe here @oxy is referring to the latest version of code-server: 3.9.1
I was able to get Python working with version (code-server 3.9.2 109d2ce3247869eaeab67aa7e5423503ec9eb859 ) of code-server by doing these in order
- Disable extensions.autoUpdate ( label Extensions: Auto update )
- Downloading version ms-toolsai.jupyter-2020.11.358541065 of jupyter and installing it ( you can google the whole string )
- Downloading version ms-python.python-2020.11.358366026 of python and installing it
This project is so great , it gives me the same excitey feelings as emacs, so great.
I am also unable to start python. local os = Windows 10 remote os = Oracle Linux 7.8 vscode server 1.54.3
installed extensions
- Python v2021.3.680753044
- GitLens v11.3.0
Error message: Cannot activate the 'Python' extension because it depends on the 'Jupyter' extension, which is disabled. Would you like to enable the extension and reload the window?
However Jupyter is not supported on VS Code Server (see my related issue in https://github.com/microsoft/vscode-jupyter/issues/5342#issuecomment-809540167) and I can not install that extension remotely.
@trir262 what version of code-server are you using?
I added this to an upcoming milestone. We'll investigate.
I hope I have the right version : 1.54.3 I looked in .vscode-server/bin/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/package.json
Ah, yes, that's the VS Code version. I meant the code-server version. Here's where you can find it:

Apologies, Here's my info: Version: 1.54.3 (system setup) Commit: 2b9aebd5354a3629c3aba0a5f5df49f43d6689f8 Date: 2021-03-15T10:55:45.459Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042
No worries at all! Hmm...That looks like VS Code's Help information (not code-server). A few follow-ups:
- What does your setup look like?
- How are you using code-server?
- What version of code-server are you using?
Here are the steps I took:
Installed vscode on win10 client Installed "Remote Development" extension Connected to SSH Linux endpoint, which installed vscode server Downloaded vsix for Python, gitlens & jupyter Installed Python & Gitlens via offline install (linux device has no access to internet) Unable to install Jupyter (apparently that's not supported, according to my other issue) Opened a remote path that has a .py file in it Opened .py file --> Exception appears in bottom screen I don't run vscode in a web browser but use the client
Ah, that clarifies things a bit. Thanks for the extra notes! We'll investigate this further. Though it sounds like your issue is with the Jupyter extension and not the Python extension? Or rather both I guess.
Do you mind opening a separate issue for the issues with Jupyter and link to that other issue you opened? That way, when we look at separate the two issues.
I now went to Extensions and saw the possibility to install the extensions to the remote endpoint. That way I am able to install the extensions and now it does seem to work for me. I was able to install Jupyter and now python dev works as it should. There is an inconsistency apparently in installing vsix offline and "Installing extension in remote"
Ah yeah, we could probably do a better job explaining the differences between the two. Well glad you got it working!
@trir262 hi!
Just noticed this - you appear to be using Microsoft's 'official'/proprietary vscode-server binary, not our open-source code-server tool (which is what this repo is for). We currently do not support connecting to a locally installed VSCode with an extension, and code-server can only be accessed in a web browser.
I've mentioned this on the original issues you've filed upstream too!
Here went to the same issue, but after updating Python and Jupyter extensions, this error had disappeared.
Error: Cannot find module '/home/username/.local/share/code-server/extensions/ms-toolsai.jupyter-2020.12.1/out/client/extension'
Now Just having this error
[Extension Host] (node:62109) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
and when to try starting thing : Notification comes out : Python extension loading... (Looks like python extension not loading?)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.