question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jupyter Notebooks not working

See original GitHub issue

OS/Web Information

  • Web Browser: Firefox 89.0.2 (64-bit)
  • Local OS: macOS 10.14.6 (Mojave)
  • Remote OS: Debian buster
  • Remote Architecture: 64-bit
  • code-server --version: 3.11.0 4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd

Steps to Reproduce

  • Create a .ipynb file

Expected

Jupyter extension should load and display the Jupyter notebook.

Actual

jupyter_error

Logs

Log (Remote Extension Host)

[2021-07-15 07:06:36.925] [exthost] [error] Activating extension ms-toolsai.jupyter failed due to an error:
[2021-07-15 07:06:36.925] [exthost] [error] Error: Cannot find module '/home/jovyan/.local/share/code-server/extensions/ms-toolsai.jupyter-2021.6.99/out/client/extension'
Require stack:
- /opt/code-server/lib/vscode/out/vs/loader.js
- /opt/code-server/lib/vscode/out/bootstrap-amd.js
- /opt/code-server/lib/vscode/out/bootstrap-fork.js
	at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
	at Function.Module._load (internal/modules/cjs/loader.js:746:27)
	at Function.n._load (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:27915)
	at Function.E._load (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:24661)
	at Function.c._load (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:93:59193)
	at Module.require (internal/modules/cjs/loader.js:974:19)
	at require (internal/modules/cjs/helpers.js:92:18)
	at Function.t [as __$__nodeRequire] (/opt/code-server/lib/vscode/out/vs/loader.js:5:101)
	at f._loadCommonJSModule (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:26067)
	at f._doActivateExtension (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:89:12599)
	at f._activateExtension (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:89:11658)
	at Object.actualActivateExtension (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:89:9243)
	at l._activateExtension (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:84:85443)
	at /opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:84:85125
	at Array.map (<anonymous>)
	at l._activateExtensions (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:84:85113)
	at l.activateByEvent (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:84:82447)
	at f._activateByEvent (/opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:89:10142)
	at /opt/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:89:20014
	at processTicksAndRejections (internal/process/task_queues.js:95:5)

Screenshot

See above.

Notes

This issue can be reproduced in VS Code: No


@jsjoeio This is the bug report you asked for in issue https://github.com/cdr/code-server/issues/3776.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:74 (50 by maintainers)

github_iconTop GitHub Comments

4reactions
bhatiaabhinavcommented, Jan 2, 2022

I found this thread after hours of searching on the Internet for the enable-proposed-api problem. And it took another hour to read and understand.

Here is what worked for me finally (@jsjoeio’s solution https://github.com/coder/code-server/issues/3782#issuecomment-996202105) :

  1. Install v4.0.0 prelease code-server.
  2. Install the latest python extension from the sidebar (and the Jupyter extension will get installed automatically). In my case it was Python v2021.12.1559732655 (and Jupyter v2021.11.1001552333).
  3. Add the following snippet to ~/.local/share/code-server/extensions/ms-toolsai.jupyter-<version>/package.json
"enabledApiProposals": [
        "notebookConcatTextDocument",
        "notebookControllerKind",
        "notebookDebugOptions",
        "notebookDeprecated",
        "notebookEditor",
        "notebookEditorDecorationType",
        "notebookEditorEdit",
        "notebookMessaging",
        "notebookMime",
        "notebookCellExecutionState",
        "portsAttributes",
        "textDocumentNotebook",
        "quickPickSortByLabel"
    ],

Restart code-server (without any --enabled-proposed-api arguments)

4reactions
fritterhoffcommented, Dec 19, 2021

So far I figured out at least two issues that are rather strange:

  1. Running NBs does not work: (According to browser console File not found)

https://user-images.githubusercontent.com/32478819/146665568-7ea1ed7e-8608-41fe-b6f2-7b7d89c9cc47.mp4

  1. Changing Python Interpreter does not work. "Failed to set 'pythonPath'. Error: Unable to write to Folder Settings because no resource is provided."

https://user-images.githubusercontent.com/32478819/146665708-4a95dbc2-c678-4dd6-bbcc-42aacdafc505.mp4


Okay seems like I figured out in which situation it works and in which not:

If I start code-server using code-server . (notice the dot for the current directory) and visit it using the browser afterwards:

Maybe that helps?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter notebook not running code. Stuck on In [*]
Go to the folder where you have your ipython notebook(.ipynb) · Press shift and right click on the empty space then select "open...
Read more >
Solve problems with Jupyter Notebooks - coursera.support
Unsaved work · Save your notebook locally to store your current progress · In the notebook toolbar, click Kernel, then Restart · Try...
Read more >
Jupyter notebook browser page not loading
Hello, I have been using Jupyter Notebook successfully for a long time, but today I have encountered a strange problem. Running on windows...
Read more >
How to Fix Kernel Error in Jupyter Notebook
1. Access the back-end of the tool. · 2. Open Base Environment and select your directory. · 3. Create another environment for your...
Read more >
How to Use Jupyter Notebook: A Beginner's Tutorial - Dataquest
If your goal is to work with data, using a Notebook will speed up your ... Localhost is not a website, but indicates...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found