interactive
interactive copied to clipboard
Cell with Display("application/json") outputs error right after opening ipynb
Describe the bug
- I create a new ipynb notebook, with just one cell containing the following code:
new[]{1,2,3}.Display("application/json")
- I execute the notebook.
- I save the notebook.
- I close the notebook tab.
- In Windows Explorer, I double click the notebook file.
- The notebook file is opened in VS Code.
- The first cell output is replaced by an error.
The complete error output:
TypeError: o.endsWith is not a function
at i (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:142405)
at c (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:143044)
at f (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:143852)
at h (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:144591)
at Array.map (<anonymous>)
at [c:\Users\Marc\AppData\Local\Programs\Microsoft](file:///C:/Users/Marc/AppData/Local/Programs/Microsoft) VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:145700
at [c:\Users\Marc\AppData\Local\Programs\Microsoft](file:///C:/Users/Marc/AppData/Local/Programs/Microsoft) VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:146017
at [c:\Users\Marc\AppData\Local\Programs\Microsoft](file:///C:/Users/Marc/AppData/Local/Programs/Microsoft) VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:146024
at Array.map (<anonymous>)
at e.$d (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:145276)
at e.$m.deserializeNotebook (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ipynb\dist\ipynbMain.js:1:156863)
at t.$dataToNotebook (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:127:91523)
at i.S (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:134:10827)
at i.Q (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:134:10593)
at i.M (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:134:9645)
at i.L (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:134:8901)
at s.value (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:134:7565)
at c.z (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:80:1902)
at c.fire (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:80:2119)
at m.fire (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:14010)
at s.value (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:7902)
at c.z (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:80:1902)
at c.fire (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:80:2119)
at m.fire (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:14010)
at MessagePortMain.<anonymous> (c:\Users\Marc\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:6182)
at MessagePortMain.emit (node:events:513:28)
at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367)
Note: this bug is not happening with the following code.
new[]{1,2,3}.Display("text/plain")
and
new[]{1,2,3}.DisplayTable()
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):
Version: 1.0.455201+dc124d130c174e7528002c06809edd1d704aa529
- OS
- [ ] Windows 11
- [x] Windows 10
- [ ] macOS
- [ ] Linux (Please specify distro)
- [ ] iOS
- [ ] Android
- Browser
- [ ] Chrome
- [ ] Edge
- [ ] Firefox
- [ ] Safari
- Frontend
- [ ] Jupyter Notebook
- [ ] Jupyter Lab
- [ ] nteract
- [x] Visual Studio Code
- [ ] Visual Studio Code Insiders
- [ ] Visual Studio
- [ ] Other (please specify)
Upstream issue https://github.com/microsoft/vscode/issues/197870