bokeh / jupyter_bokeh

An extension for rendering Bokeh content in JupyterLab notebooks
BSD 3-Clause "New" or "Revised" License
249 stars 48 forks source link

Failed to register jupyter_bokeh #201

Open obrown06 opened 3 months ago

obrown06 commented 3 months ago

I'm trying to integrate a Tabulator into a Voila application as follows:

import pandas as pd
import panel as pn
pn.extension('tabulator')

df = pd.DataFrame(...)
df_widget = pn.ipywidget(pn.widgets.Tabulator(df))

I'm getting the following rendered error:

Failed to load model class 'BokehModel' from module '@bokeh/jupyter_bokeh'

And the following errors in the javascript console:

Plugin '@bokeh/jupyter_bokeh' failed to activate.
TypeError: No provider for: jupyter.extensions.jupyterWidgetRegistry.
Error: No version of module @bokeh/jupyter_bokeh is registered

The relevant package versions:

bokeh                     3.4.0
ipywidgets                8.1.2
jupyter                   1.0.0
jupyter_bokeh             4.0.1
jupyterlab                4.0.11
jupyterlab_widgets        3.0.10
panel                     1.4.1
python                    3.10.14

Anyone have an idea what might be going wrong here? Happy to redirect the query elsewhere if this isn't the right place. Thanks!

bryevdv commented 3 months ago

According to a Jupyter core dev

That indicates that the Jupyter widgets extension is not installed. Assuming your server is running jlab 3, it can be installed by installing ipywidgets 7.6+ or by installing jupyterlab_widgets 1.0+.

Is it possible you have an environment mixup and jupyterlab_widgets is not installed in the same environment you think it is?

Edit: But I guess that thread goes on to indicate that other scenarios can also cause this to happen. That's outside my expertise thought cc @philippjfr @mattpap

obrown06 commented 3 months ago

FWIW: I'm using Conda and it seems like jupyterlab_widgets is definitely installed:

conda list | grep jupyterlab_widgets
jupyterlab_widgets        3.0.10
obrown06 commented 3 months ago

Also, it looks like at least someone else may be hitting the same issue: https://community.deeplearning.ai/t/replicating-chatbot-implementation-with-huggingface-open-source-models/596117.

Kalandoros commented 1 month ago

I got the same issue. This is not new issue. It's already persising for longer

jupyter_bokeh 4.0.4 jupyter_client 8.1.0 jupyter_core 5.3.0 jupyter-events 0.7.0 jupyter-lsp 2.2.0 jupyter_server 2.7.3 jupyter_server_terminals 0.4.4 jupyterlab 4.2.1 jupyterlab-pygments 0.2.2 jupyterlab_server 2.27.2 jupyterlab_widgets 3.0.10 panel 1.4.3 voila 0.5.7

labextensions: @bokeh/jupyter_bokeh v4.0.4 enabled ok (python, jupyter_bokeh) @pyviz/jupyterlab_pyviz v3.0.2 enabled ok

image

You may also have a look here: https://github.com/voila-dashboards/voila/issues/1435 I am pretty sure that this is related. Unfortunately, due to a lack of knowledge, I am not in a position to make any further investigatens.