Open sharon-wang opened 2 months ago
This happens even without using the project wizard. It's due to some reused notebook code expecting the vscode notebook editor class to be the one responsible for the document.
Thanks for the additional context! I've updated the issue title and description 👍
Positron Version: 2024.06.0-50
Steps to reproduce the issue:
Pre-req: Enable the Positron Notebooks configuration setting
positron.notebooks.usePositronNotebooks
via New File
via Project Wizard
What did you expect to happen?
The behaviour should match the default notebooks (when
positron.notebooks.usePositronNotebooks
is disabled). There should not be a series of errors in the developer console. Via the Project Wizard, a new project should be created successfully and the selected interpreter should be selected. See #2820.Were there any error messages in the output or Developer Tools console?
Console errors
Several
ERR Illegal state: Expected notebook editor: Error: Illegal state: Expected notebook editor
errors logged -- I am only including the first one in the details below.Details
``` contextKeyService.ts:446 Element already has context attribute: positron-notebook-container ... ERR Illegal state: Expected notebook editor: Error: Illegal state: Expected notebook editor at illegalState (vscode-file://vscode-app/Users/sashimi/positron/out/vs/base/common/errors.js:149:20) at Object.getComparisonKey (vscode-file://vscode-app/Users/sashimi/positron/out/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js:51:53) at InlineChatSessionServiceImpl._key (vscode-file://vscode-app/Users/sashimi/positron/out/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js:566:24) at InlineChatSessionServiceImpl.getSession (vscode-file://vscode-app/Users/sashimi/positron/out/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js:560:30) at EmptyCellEditorHintContribution._shouldRenderHint (vscode-file://vscode-app/Users/sashimi/positron/out/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js:92:47) at EmptyCellEditorHintContribution._shouldRenderHint (vscode-file://vscode-app/Users/sashimi/positron/out/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js:33:44) at EmptyCellEditorHintContribution.update (vscode-file://vscode-app/Users/sashimi/positron/out/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js:110:43) at UniqueContainer.value (vscode-file://vscode-app/Users/sashimi/positron/out/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js:50:73) at Emitter._deliver (vscode-file://vscode-app/Users/sashimi/positron/out/vs/base/common/event.js:889:26) at Emitter._deliverQueue (vscode-file://vscode-app/Users/sashimi/positron/out/vs/base/common/event.js:900:22) at Emitter.fire (vscode-file://vscode-app/Users/sashimi/positron/out/vs/base/common/event.js:923:22) at CodeEditorWidget.setModel (vscode-file://vscode-app/Users/sashimi/positron/out/vs/editor/browser/widget/codeEditor/codeEditorWidget.js:303:36) at vscode-file://vscode-app/Users/sashimi/positron/out/vs/workbench/contrib/positronNotebook/browser/notebookCells/CellEditorMonacoWidget.js:81:24 ... ERR Notebook Editor creation failure for document {"$mid":1,"fsPath":"Untitled-1.ipynb","external":"untitled:Untitled-1.ipynb?jupyter-notebook","path":"Untitled-1.ipynb","scheme":"untitled","query":"jupyter-notebook"}: Error: Notebook Editor creation failure for document {"$mid":1,"fsPath":"Untitled-1.ipynb","external":"untitled:Untitled-1.ipynb?jupyter-notebook","path":"Untitled-1.ipynb","scheme":"untitled","query":"jupyter-notebook"} at ExtHostCommands._executeContributedCommand (/Users/sashimi/positron/out/vs/workbench/api/common/extHostCommands.js:211:23) ... ```Positron Notebook Controllers Output