Closed jatentaki closed 6 months ago
Chiming in,
Also worked for me without reinstalling jupyterlab
, but solely downgrading jupyterlab-widgets
and ipywidgets
.
pip uninstall jupyterlab-widgets ipywidgets
pip install ipywidgets==7.7.1 jupyterlab-widgets==1.1
The examples on mybinderhub also seem broken. Dev console errors start with failing to load
https://hub.gke2.mybinder.org/user/k3d-tools-k3d-jupyter-etmiy3v5/static/k3d.js?v=20220907115548
Pinning ipywidgets==7.7.1 jupyterlab-widgets==1.1
also worked for me
I've got a similar problem:
[Open Browser Console for more detailed log - Double click to close this message] Model class 'PlotModel' from module 'k3d' is loaded but can not be instantiated
Pinning ipywidgets==7.7.1
and jupyterlab_widgets==1.1.0
did not work for me.
Please try 2.15.0 (https://pypi.org/project/k3d/ for conda-forge we need to wait a little bit). @renefritze contribution should solve that
@artur-trzesiok I've tried 2.15.2 and the hello world plot from the user guide as well as other examples (nbody) still fail with jupyterlab with errors like #384 .
Is 2.15.x supposed to work with jupyterlab?
Yes it is
Aha.... this has answered a wee problem I was trying to solve - except I'm actually still running the classic UI.
My current versions, prepping for the 23/24 setup, are
jupyterlab 3.4.8
jupyterlab_widgets 3.0.7
k3d 2.15.2
notebook 6.4.12
The library is fine if I switch to the lab UI, but gives me the error in classic
If I compare this to my 22/23 setup - which has
jupyterlab 3.3.4
jupyterlab_widgets 1.1.1
k3d 2.13.1
notebook 6.4.11
.... jupyterlab_widgets
is the big change
I believe that this issue is very old and jupyter changed a api so probably it is no longer valid.
I had the same issue:
Failed to load model class 'PlotModel' from module 'k3d'
Updating ipywidgets and jupyterlab_widgets to the versions below solved the issue for me:
pip install jupyterlab-widgets==3.0.9 ipywidgets==8.1.1
Description
There is an issue with K3D alongside the latest versions of jupyterlab. Running with
jupyterlab_widgets=3.*
(default, currently latest) causes JS crashes, whereas manually setting to1.1
works. The crash manifests itself first in the consoleand then in a JS error in the notebook
Clicking opens this:
![image](https://user-images.githubusercontent.com/22394841/186616989-acca11af-ac3a-4868-bba5-c2606c0fedad.png)
What I Did
To reproduce, I create an empty env with
conda create -n k3d-test python=3.8 numpy
, activate it and thenpip install jupyterlab k3d
pip install jupyterlab k3d jupyterlab-widgets==1.1
Web console log / python logs
Text content of the error show in notebook: