Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make sure that all session contexts has unique IDs even if they don't have a kernel #3971

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
1 participant