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.

Choosing a kernel should provide a reasonable default language for cells in a new notebook.

See original GitHub issue

Environment data

  • VS Code version: 1.53.0-insiders
  • Jupyter Extension version (available under the Extensions sidebar):v2020.12.414227025
  • Python Extension version (available under the Extensions sidebar): Python isn’t installed
  • OS (Windows | Mac | Linux distro) and version: Windows 10
  • Python and/or Anaconda version: Isn’t installed
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Jupyter server running: N/A
  • .NET Interactive extension: v1.0.207203

Expected behaviour

Once the user selects the one of a .Net Interactive kernel is selected from the kernel picker I expect the kernel to be recognize it. This only happens in the initial install of .NET Interactive but, doesn’t work in a new instance of VS Code.

Actual behaviour

The .NET Interactive kernel isn’t recognized in new VS Code instance. The user can select one of the .NET Interactive kernels however, when they hit the run button you are promoted to “Select a kernel to run the notebook”

Steps to reproduce:

Opening a New Notebook

  • Open a new window in VS Code Ctrl + Shift + N
  • Opened a new notebook - Using the Jupyter image
  • Cell default to a non .NET Interactive kernel image what kernel is it looking at ?
  • Switching to C# .NET Interactive by clicking on the c# label. . image
  • Selected C# .NET Interactive hit run and promoted to select a kernel image

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Apr 12, 2021

@DavidKutu Please make note of the changes from displayName to title

0reactions
DonJayamannecommented, Apr 12, 2021

We’re going to have to make changes to the API to make this possible.

  • Rather than getting .net to call our API registerNewNotebookContent
    • We will query all extensions & check if they contribute to us (read package.json and look for their contributions & update the list of the notebooks in the quick pick
  • Modify CreationOptions.registrations in src/client/datascience/notebook/creation/creationOptionsService.ts
    • Read package.json of other extensions using vscode.extensions.all.filter(item => item.packageJSON?.contributes?['jupyter.kernels'].....
contributes: {
  jupyter.kernels: [
    {
      title: ".NET Interactive Notebook (C#)",
      defaultlanguage: "dotnet-interactive.csharp" // this is how our special languages register with vscode
    } ,
    {
      title: ".NET Interactive Notebook (F#)",
      defaultlanguage: "dotnet-interactive.fsharp"
    }
  ]
}

Note sure we need kernelId (I’d personally remove that as we don’t need it)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kaggle Kernels Guide for Beginners — Step by Step Tutorial
Go to any Public Kaggle Dataset; Click New Kernel on the top right (blue-colored button); Select Notebook/Script of your interest; If Python is ......
Read more >
Use multi-language notebooks with Spark kernels
Each Jupyter notebook kernel has a default language. For example, the Spark kernel's default language is Scala, and the PySpark kernels's default language ......
Read more >
Running your own kernel - Deepnote docs
The best way to run a custom kernel is to find an existing image, for example on Dockerhub, and then set the environment...
Read more >
How to Use Jupyter Notebook: A Beginner's Tutorial
Use this tutorial to learn how to create your first Jupyter Notebook, important terminology, and how easily notebooks can be shared and ...
Read more >
Chapter 11 Combining code and text with Jupyter
Figure 11.6: New cells can be created by clicking the + button, and are by default code cells. 11.5 Markdown cells. Text cells...
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