interactive
interactive copied to clipboard
Command 'Polyglot Notebook: Create new blank notebook' resulted in an error
Describe the bug
-
Having .NET SDK 7 already installed, I installed the Polyglot Notebook extension (v1.0.4403010) to VS Code (1.81.1).
-
When I try to create a new notebook from the Command Palette: Polyglot Notebook: Create new blank notebook, the Command 'Polyglot Notebook: Create new blank notebook' resulted in an error
Polyglot Notebooks v1.0.4403010
I closed VS Code, re-installed the .NET SDK and restarted VS Code, alas, the error persisted.
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about
magic command. ):
-
.NET Interactive
-
© 2020 Microsoft Corporation
-
Version: 1.0.350406+612aa40cba7d6a1f734272f71657a65561394752
-
Library version: 1.0.0-beta.22504.6+612aa40cba7d6a1f734272f71657a65561394752
-
Build date: 2022-10-15T09:10:39.8895914Z
-
OS
- [ ] Edition Windows 10 Home
-
Version 22H2
-
Installed on 20/07/2020
-
OS build 19045.3324
-
Experience Windows Feature Experience Pack 1000.19041.1000.0
-
Browser
- [ ] Edge
-
Version 115.0.1901.203 (Official build) (64-bit)
- [ ] Firefox 116.0.2 (32-bit)
-
Frontend
- [ ] Jupyter Notebook (Anaconda 3, Python 3.7, 3.10)
- [ ] Jupyter Lab
- [ ] Visual Studio Code
-
Version: 1.81.1 (user setup)
-
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
-
Date: 2023-08-09T22:22:42.175Z
-
Electron: 22.3.18
-
ElectronBuildId: 22689846
-
Chromium: 108.0.5359.215
-
Node.js: 16.17.1
-
V8: 10.8.168.25-electron.0
-
OS: Edition Windows 10 Home Version 22H2 19045.3324
- [ ] Visual Studio 2022, 2019, 2017
Screenshots
If applicable, add screenshots to help explain your problem.
Workaround to get a Powershell interactive notebook (if Jupyter notebooks are working/Python is installed)
- read here: https://powershellisfun.com/2022/08/04/jupyter-notebooks-in-vscode-with-powershell-support/
- run: pip install powershell_kernel
- create a PS.ipynb
- set the interpreter/kernel to .NET (Powershell) for the respective code cells
- (the you can run the magic command successfully, though you don't need it anymore ;-) : In a notebook, run the
#!about
magic command.)
This issue would be on the Polyglot Notebooks extension or VS Code end and would be unrelated to your .NET installation.
Do you have any pending VS Code or extension updates? These troubleshooting steps might help.
https://github.com/dotnet/interactive/blob/main/docs/FAQ.md#nothing-happens-when-running-a-cell
Hi Jon thanks for looking at this issue.
a) I am still unable to create a Polyglot notebook per Ctrl+Shift+p
b) I did have pending updates for c# extension, which I did update, alas to no avail (of course including closing and restarting VS Code). That's why I kept searching for some kind of solution. I eventually found the workaround I described at the end of my issue description. Hence, I can create an .ipynb manually in which I am able to run c# code cells.
Best, Volker
Actually, the workaround I found works for Powershell only. Unable to select C# for a code cell. When choosing Autodetect, the cell is set to C# but when run nothing happens <- in the manually created .ipynb.
(Still unable to create a new Polyglot notebook, which may wire up such that I may choose a C#/.Net kernel directly?)
Oh wait, if I select Jupyter first, C#.net may be offered upon clicking on Python in the code cell. <- Weird, very circumvent. Will it still work in the next session? Will I still remember next time? There's got to be a direct way and still what about not being able to create a new Polyglot notebook?
The workaround you posted is using a different kernel from .NET Interactive.
Oh wait, if I select Jupyter first, C#.net may be offered upon clicking on Python in the code cell.
This will create a notebook targeting the Python kernel.
When using the .NET Interactive kernel, you should see .NET Interactive
in the upper right corner, which is the kernel selector for the notebook:
Once you've created a Python notebook, are you able to click that kernel selector and select .NET Interactive by any chance?
Yep, that' what I am expecting but not finding
I'm having the same issue. Just installed Polyglot Notebooks and I cannot create a new notebook:
And I also see this - it never ends:
In my case, the problem proved to be the nuget sources configured on my machine as explained here: https://github.com/dotnet/interactive/issues/3233#issuecomment-1842657094