deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

Trip Layer .show() not working in JupyterLab v3

Open KPouianou opened this issue 4 years ago • 14 comments

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

  • Try to run the example at https://pydeck.gl/gallery/trips_layer.html, and replace the last line: r.to_html("trips_layer.html") with r.show()

Environment

  • Pydeck 0.5.0
  • JupyterLab 3.0.8
  • Google Chrome Version 89.0.4389.90 (Official Build) (x86_64)
  • macOS Big Sur (version 11)

KPouianou avatar Mar 26 '21 10:03 KPouianou

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.

ajduberstein avatar Mar 29 '21 18:03 ajduberstein

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

Environment:

  • JupyterLab 3.0.16
  • Pydeck 0.6.2
  • Chrome and Safari (current, official versions)
  • macOS Big Sur (11.4)

dakoop avatar May 27 '21 16:05 dakoop

@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 avatar Jun 21 '21 02:06 6A61736F6E206E61646572

Downgraded to JupyterLab 2.3 for now, it works there.

6A61736F6E206E61646572 avatar Jun 21 '21 03:06 6A61736F6E206E61646572

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

dakoop avatar Jun 21 '21 20:06 dakoop

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

ajduberstein avatar Jun 21 '21 21:06 ajduberstein

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.

6A61736F6E206E61646572 avatar Sep 17 '21 02:09 6A61736F6E206E61646572

@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)

ammgws avatar Oct 12 '21 02:10 ammgws

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

davidbrochart avatar Oct 22 '21 12:10 davidbrochart

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.

ammgws avatar Oct 22 '21 12:10 ammgws

@davidbrochart Have you had any luck?

6A61736F6E206E61646572 avatar Oct 26 '21 01:10 6A61736F6E206E61646572

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

davidbrochart avatar Oct 26 '21 06:10 davidbrochart

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.

ammgws avatar Oct 27 '21 01:10 ammgws

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

dakoop avatar Jun 07 '22 03:06 dakoop