Repository navigation
Error starting Python extension under code-server #2929
Copy link
Copy link
Closed
Milestone
Description
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 06c7e17
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 #2675 or microsoft/vscode-python#14959. It may also be a limitation of Coder's internal extension marketplace
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

Activity
code-asher commentedon Mar 18, 2021
Fingers crossed this might be fixed. 🤞 #2341 (comment)
oxy commentedon Mar 20, 2021
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?
ediphy-dcottrell commentedon Mar 25, 2021
Can you confirm context of "versoin"? Version of code-server or version of extension?
jsjoeio commentedon Mar 25, 2021
@ediphy-dcottrell I believe here @oxy is referring to the latest version of code-server: 3.9.1
qorrect commentedon Mar 27, 2021
I was able to get Python working with version (
code-server 3.9.2 109d2ce3247869eaeab67aa7e5423503ec9eb859 )of code-server by doing these in orderThis project is so great , it gives me the same excitey feelings as emacs, so great.
trir262 commentedon Mar 29, 2021
I am also unable to start python.
local os = Windows 10
remote os = Oracle Linux 7.8
vscode server 1.54.3
installed extensions
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 microsoft/vscode-jupyter#5342 (comment)) and I can not install that extension remotely.
jsjoeio commentedon Mar 29, 2021
@trir262 what version of code-server are you using?
I added this to an upcoming milestone. We'll investigate.
trir262 commentedon Mar 29, 2021
I hope I have the right version : 1.54.3
I looked in .vscode-server/bin/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/package.json
jsjoeio commentedon Mar 29, 2021
Ah, yes, that's the VS Code version. I meant the code-server version. Here's where you can find it:

trir262 commentedon Mar 29, 2021
Apologies,
Here's my info:
Version: 1.54.3 (system setup)
Commit: 2b9aebd
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
jsjoeio commentedon Mar 29, 2021
No worries at all! Hmm...That looks like VS Code's Help information (not code-server). A few follow-ups:
trir262 commentedon Mar 29, 2021
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
jsjoeio commentedon Mar 29, 2021
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.
trir262 commentedon Mar 29, 2021
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"
jsjoeio commentedon Mar 29, 2021
Ah yeah, we could probably do a better job explaining the differences between the two. Well glad you got it working!
oxy commentedon Mar 30, 2021
@trir262 hi!
Just noticed this - you appear to be using Microsoft's 'official'/proprietary
vscode-serverbinary, not our open-sourcecode-servertool (which is what this repo is for). We currently do not support connecting to a locally installed VSCode with an extension, andcode-servercan only be accessed in a web browser.I've mentioned this on the original issues you've filed upstream too!
SJang1 commentedon Apr 21, 2021
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?)
stale commentedon Oct 18, 2021
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.