K3D-tools / K3D-jupyter

K3D lets you create 3D plots backed by WebGL with high-level API (surfaces, isosurfaces, voxels, mesh, cloud points, vtk objects, volume renderer, colormaps, etc). The primary aim of K3D-jupyter is to be easy for use as stand alone package like matplotlib, but also to allow interoperation with existing libraries as VTK.
MIT License
917 stars 123 forks source link

No version of module k3d is registered #374

Closed Tsingularity closed 1 year ago

Tsingularity commented 1 year ago

Description

When I try to run k3d in my jupter lab, I got the following error messages:

[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'PlotModel' from module 'k3d'
Error: No version of module k3d is registered
    at f.loadClass (http://localhost:8889/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.083e6b37f2f7b2f04b5e.js?v=083e6b37f2f7b2f04b5e:1:74855)
    at f.loadModelClass (http://localhost:8889/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:10721)
    at f._make_model (http://localhost:8889/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:7517)
    at f.new_model (http://localhost:8889/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:5137)
    at f.handle_comm_open (http://localhost:8889/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:3894)
    at _handleCommOpen (http://localhost:8889/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.083e6b37f2f7b2f04b5e.js?v=083e6b37f2f7b2f04b5e:1:73392)
    at b._handleCommOpen (http://localhost:8889/static/lab/jlab_core.081dc2b13065c79d8463.js?v=081dc2b13065c79d8463:2:994257)
    at async b._handleMessage (http://localhost:8889/static/lab/jlab_core.081dc2b13065c79d8463.js?v=081dc2b13065c79d8463:2:996247)
renefritze commented 1 year ago

Do you maybe also see a failure to load k3d.js like I did the other ticket?

agoose77 commented 1 year ago

This is likely due to the latest ipywidgets8 release. You could try pip install git+https://github.com/agoose77/K3D-jupyter#chore-use-hatch to install the branch from #378, and see whether it fixes things. You'd need to reload JupyterLab in the browser.

artur-trzesiok commented 1 year ago

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