Skip to content

Conversation

Kontinuation
Copy link

Fixes #3970 by making sure that we can always retrieve the widget manager owner from a session context, even if the session context does not have kernel attached. This gets rid of the exception when retrieving the kernel ID from session context with no kernel:

plugin.ts:153 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'kernel')
    at getWidgetManagerOwner (plugin.ts:153:34)
    at async registerWidgetHandler (plugin.ts:175:25)
    at async plugin.ts:424:7

ipywidgets works properly after attaching ipykernel to a notebook that initially has no kernel after applying this fix.

Copy link

Binder 👈 Launch a binder notebook on branch Kontinuation/ipywidgets/fix-init-no-kernel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Widgets cannot be displayed when the notebook is opened with no kernel attached, even after we attach the notebook to an ipykernel.
1 participant