WormChickenWizard
WormChickenWizard

Reputation: 93

Jupyter extension for VSCode on Linux throws error when doing anything Jupyter related

After installing code-oss on Manjaro Linux along with the Jupyter extension for code and jupyter-notebooks itself, the extension seems to error when I try to do anything Jupyter related inside code. If I try to create a new notebook from the command pallete, it pops up a dialog saying this:

Command 'Jupyter: Create New Jupyter Notebook' resulted in an error (command 'jupyter.createnewnotebook' not found)

Code then tells me that the extension activation failed and to open the chrome developer console for more information. This is what the chrome console then says:

extension activation failed Error: Extension 'ms-toolsai.jupyter' CANNOT use API proposal: notebookEditor. Its package.json#enabledApiProposals-property declares:  but NOT notebookEditor. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-toolsai.jupyter

Initial Pop-up error Chrome Console error

Upvotes: 8

Views: 8909

Answers (3)

kodmarcel
kodmarcel

Reputation: 41

Had the same problem and found out this is happening because of the open source version of code - OSS. It does not have the proper config in the product.json.

The accepted solution to add to Runtime Arguments unfortunately didn't work on Arch.

Easiest solution for me was to install code-features from AUR.

You can find more info on arch wiki site

Or directly on microsoft docs regarding oss code issues.

Upvotes: 4

user3037237
user3037237

Reputation: 425

The solution to add "enable-proposed-api": ["ms-toolsai.jupyter"] to the runtime of vscode didn't work for me on Arch linux. But when I started vscode from the command line using the argument "--enable-proposed-api ms-toolsai.jupyter" the problem was solved. So I created a custom desktop launcher for this:

Fist, copy the desktop launcher to your applications folder

$ cp /usr/share/applications/code-oss.desktop ~/.local/share/applications/.

Then edit the new file:

$ nano ~/.local/share/applications/code-oss.desktop

Now add "--enable-proposed-api ms-toolsai.jupyter" to both of the Exec lines like so:

[Desktop Entry]
Name=Code - OSS
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/bin/code-oss --enable-proposed-api ms-toolsai.jupyter --unity-launch %F
Icon=com.visualstudio.code.oss
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=TextEditor;Development;IDE;
MimeType=text/plain;application/x-code-oss-workspace;
Actions=new-empty-window;
Keywords=vscode;

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/bin/code-oss --enable-proposed-api ms-toolsai.jupyter --new-window %F
Icon=com.visualstudio.code.oss

I restarted my computer and the problem was solved.

Upvotes: 5

lennart9499
lennart9499

Reputation: 206

You can solve that problem by inserting"enable-proposed-api": ["ms-toolsai.jupyter"] in the start settings of vs code. So press CTRL+ALT+P -> "Preference: Configure Runtime Arguments" then insert the upper line. After that restart vscode.

Upvotes: 19

Related Questions