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 13 forks source link

'jp_proxy_widget' is loaded but can not be instantiated exception #39

Open michaelhball opened 1 year ago

michaelhball commented 1 year ago

Hey there, this project looks awesome.

I'm seeing this error when trying the minimal example from the first cell in your notebook.

image

The error in the browser console is

image

Any ideas what could be causing it?

AaronWatters commented 1 year ago

I don't know why this is happening, but when I build using repo2docker I see a bunch of ominous warnings fly by:


(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages 
(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages 
Building jupyterlab assets (development)...

possibly more.

This kind of thing happens every few months with no assistance from me and I'm really tired of it. That's why I am developing https://github.com/AaronWatters/H5Gizmos as a substitute for jupyter widgets (among other things).

However, I will try to see if I can fix the problem with jp_proxy_widgets in the next few days. If I don't find a fix by then it will be after a week vacation and possibly jury duty...

AaronWatters commented 1 year ago

When I use the versions of jupyter classic notebook and jupyter lab currently distributed by conda the classic notebook displays jp_proxy_widgets but jupyter lab doesn't, fyi.

AaronWatters commented 1 year ago

The "vanilla javascript widget cookiecutter" produces the same error.

https://github.com/jupyter-widgets/widget-cookiecutter/issues/106

AaronWatters commented 1 year ago

Appeals to discussion lists have elicited radio silence. There seems to be no documentation on this latest breakage and no one seems motivated to even make the cookiecutter work.

The latest version of classic notebook displays the following

UPDATE Read [the migration plan](https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html) to Notebook 7 to learn about the new features and the actions to take if you are using extensions - Please note that updating to Notebook 7 might break some of your extensions.

I haven't found any useful information about how to migrate a widget implementation (which is a type of extension) but I presume I will have to fix things again when Notebook 7 comes out.

Therefore my provisional plan is to wait for Notebook 7 and then possibly make jp_proxy_widgets work then, if ever. If you want or need to use jp_proxy_widgets please use an older version of classic notebook for now.

Also please see https://github.com/AaronWatters/H5Gizmos which is intended to be a better solution, and which cannot be broken by new Jupyter releases because it doesn't depend on them (except in the Jupyter connector code).

I'll leave this issue open for now.

AaronWatters commented 1 year ago

Migrating 7 to 8 section here might help:

https://ipywidgets.readthedocs.io/en/stable/migration_guides.html

but I'll wait at least until cookiecutter is working.

stefansjs commented 1 year ago

I'm quite confused about the whole Notebook v7 thing, since it seems like jupyter is nowhere close to v7. Do you have an idea which versions of jupyter/jupyter-lab that work with this module?

AaronWatters commented 1 year ago

My working version reports this in the help-->about box.

""" Server Information: You are using Jupyter notebook.

The version of the notebook server is: 6.4.12 The server is running on this version of Python: Python 3.9.13 (main, Aug 25 2022, 18:29:29) [Clang 12.0.0 ]

Current Kernel Information: Python 3.9.13 (main, Aug 25 2022, 18:29:29) Type 'copyright', 'credits' or 'license' for more information IPython 7.31.1 -- An enhanced Interactive Python. Type '?' for help. """

I got it from a fairly recent standard Conda install.