holoviews: Javascript Errors when setting Extension in Jupyter Notebook
ALL software version info
MacOS: Ventura 13.3.1 holoviews: 1.15.4 bokeh: 2.4.3 matplotlib: 3.7.1 matplotlib-inline: 0.1.6 python: 3.10.10 jupyter notebook server: 6.5.4
Description of expected behavior and the observed behavior
After several successful plots, rendering stops completely in a Jupyter Notebook. The behaviour seems intermittent. The following simple experiment isolates the general behaviour.
In a completely new jupyter notebook, I execute three cells in order as follows:

The code is doing nothing but an import and setting extensions. The javascript console shows:
Kernel: kernel_ready (c9a6c11a-3f38-4a83-8f7f-b4eb1b310723)
kernel_exec_on_cell.js?v=20230426164150:340 [autopep8] restarting for new kernel_ready.Kernel event
outputarea.js:774 SyntaxError: Unexpected token ')'
at OutputArea.append_javascript (outputarea.js:772:1)
at OutputArea.append_mime_type (outputarea.js:710:1)
at OutputArea.append_display_data (outputarea.js:671:1)
at OutputArea.append_output (outputarea.js:345:1)
at OutputArea.handle_output (outputarea.js:256:1)
at output (codecell.js:399:1)
at Kernel._handle_output_message (kernel.js:1199:1)
at i (jquery.min.js:2:1)
at Kernel._handle_iopub_message (kernel.js:1239:1)
at Kernel._finish_ws_message (kernel.js:1018:1)
outputarea.js:774 SyntaxError: Identifier 'r' has already been declared
at OutputArea.append_javascript (outputarea.js:772:1)
at OutputArea.append_mime_type (outputarea.js:710:1)
at OutputArea.append_display_data (outputarea.js:671:1)
at OutputArea.append_output (outputarea.js:345:1)
at OutputArea.handle_output (outputarea.js:256:1)
at output (codecell.js:399:1)
at Kernel._handle_output_message (kernel.js:1199:1)
at i (jquery.min.js:2:1)
at Kernel._handle_iopub_message (kernel.js:1239:1)
at Kernel._finish_ws_message (kernel.js:1018:1)
Important: If I go back and run the cells again … no errors.
The challenge is the behaviour shows up intermittently in that graphical output will be fine for several cells, then stop working. Clearing the fault and getting expected behaviour again means forcing re-import of holoviews and/or resetting the extension until the JS error no longer appears and/or restarting the kernel.
I’m not sure if this is a Holoviews challenge or a Jupyter challenge b/c when running in my working notebook I sometimes get this JS console error:
Comm promise not found for comm id hv-extension-comm
CommManager.comm_msg @ comm.js:127
i @ jquery.min.js:2
Kernel._handle_iopub_message @ kernel.js:1239
Kernel._finish_ws_message @ kernel.js:1018
(anonymous) @ kernel.js:1009
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:1009
i @ jquery.min.js:2
VM104:343 [bokeh] setting log level to: 'info'
comm.js:127 Comm promise not found for comm id hv-extension-comm
CommManager.comm_msg @ comm.js:127
i @ jquery.min.js:2
Kernel._handle_iopub_message @ kernel.js:1239
Kernel._finish_ws_message @ kernel.js:1018
(anonymous) @ kernel.js:1009
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:1009
i @ jquery.min.js:2
kernel.js:466 WebSocket connection to 'ws://localhost:5533/api/kernels/0b4d3d22-ed9d-4247-935e-8ad92b358d59/channels?session_id=05bfc24a61a24d2e959bd10f2acd0b69' failed: Invalid frame header
Kernel.start_channels @ kernel.js:466
kernel.js:107 Kernel: kernel_disconnected (0b4d3d22-ed9d-4247-935e-8ad92b358d59)
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 16 (7 by maintainers)
Thank you. I could recreate the problem. It seems to be coming from
panel.io.load_notebook.@philippjfr, should I move this to Panel?