visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.26k stars 2.08k forks source link

Trip Layer .show() not working in JupyterLab v3 #5615

Open KPouianou opened 3 years ago

KPouianou commented 3 years ago

Description

Expected Behavior

Following the example at https://pydeck.gl/gallery/trips_layer.html, I tried to use .show() instead of Deck.to_html(), in order animate the trip. I am getting the following error: "Error displaying widget: model not found"

Repro Steps

Environment

ajduberstein commented 3 years ago

Thanks for filing the issue @KPouianou–right now, you still have to enable the widget manually–see the instructions https://pydeck.gl/installation.html#enabling-pydeck-for-jupyter. I'll introduce support for automatically enabling the widget for JL3 in pydeck 0.7.

dakoop commented 3 years ago

I have followed the manual installation instructions but receive the same error message (model not found) using show().

Environment:

6A61736F6E206E61646572 commented 3 years ago

@dakoop Did you figure this out? I am experiencing the same issue and am trying to troubleshoot.

The labextension itself appears to be installed correctly:

jupyter labextension list
JupyterLab v3.0.16
/home/me/.virtualenvs/pdktest/share/jupyter/labextensions
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /home/me/.virtualenvs/pdktest/share/jupyter/lab
        @deck.gl/jupyter-widget v8.4.17 enabled OK

Also within the web UI: image

Environment: ・JupyterLab v3.0.16 ・Pydeck 0.6.2 ・Firefox 89.0 ・Ubuntu 21.04 on WSL2

EDIT: this seems smelly:

image

6A61736F6E206E61646572 commented 3 years ago

Downgraded to JupyterLab 2.3 for now, it works there.

dakoop commented 3 years ago

That was the only solution I found, but to_html works for many situations in JupyterLab 3.x

ajduberstein commented 3 years ago

Thanks for raising. .show() does appear broken in JupyterLab 3. I have to make the changes listed in their migration guide.

6A61736F6E206E61646572 commented 3 years ago

I'll introduce support for automatically enabling the widget for JL3 in pydeck 0.7.

By the way I think this might have been missed for the 0.7 release.

Just tried with pydeck 0.7 and Jupyter-lab 3.1 and it's still not working.

ammgws commented 3 years ago

@ajduberstein I had a go at migrating the widget but ran into issues when using their upgrade script.

(also I cannot successfully build the current version of the widget, but perhaps that is another issue)

davidbrochart commented 3 years ago

@ammgws now that https://github.com/jupyterlab/jupyterlab/pull/11278 is merged, does it mean you successfully migrated the widget to JupyterLab3?

ammgws commented 3 years ago

No, that just resolved the exceptions it was throwing. I actually can't figure out how to successfully build the extension to test, and don't have enough experience with JavaScript to judge whether the package file ends up in a valid state, so I'm kinda stuck.

6A61736F6E206E61646572 commented 3 years ago

@davidbrochart Have you had any luck?

davidbrochart commented 3 years ago

I didn't find the time to do it yet.

ammgws commented 3 years ago

Just found a little workaround for the time being, when running Jupyter Lab v3, if you go Help -> Launch Classic Notebook, then the current widget works there.

dakoop commented 2 years ago

See #6989 for comments and code to get pydeck working with JupyterLab 3 (including as a prebuilt extension)