AaronWatters / jp_proxy_widget

Generic Jupyter/IPython widget implementation that will support many types of javascript libraries and interactions.
BSD 2-Clause "Simplified" License
61 stars 12 forks source link

Error displaying widget: model not found #27

Closed psychemedia closed 3 years ago

psychemedia commented 3 years ago

Trying to install and use jp_proxy_widget in a MyBinder JupyterLab environment launched from the https://github.com/jupyter-widgets/jupyterlab-sidecar repo raises an Error displaying widget: model not found error message.

Running in a MyBinder environment launched from this (jp_proxy_widget) repo and the widget works fine.

Doing a pip freeze, the version numbers of Jupyter packages etc look the same across repos, so presumably they're using common Binder container layers.

Is the jp_proxy_widget package on PyPi complete? I've also tried installing the package from this repo into a not-this-repo Binder environment and the error still occurs?!

AaronWatters commented 3 years ago

I saw something like this with a lot of repositories, but I don't know about installing "on the fly" into a running lab instance.

The fix I came up with is to use something like this postBuild logic or some equivalent alternative.

https://github.com/AaronWatters/test_proxy_client/blob/main/postBuild

You need the latest version of nodejs and jupyterlab3 and to initialize the labextensions.

In other configurations I saw complaints about version numbers in the Javascript console. Please see if that works for you.

psychemedia commented 3 years ago

Ah, thanks... !jupyter labextension install jp_proxy_widget did it...

In passing, I think there are simpler JupyerLab extension routes now (prebuilt federated extensions) but I've not really been tracking it or ever had much success at finding docs.

Related: