Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget load failure '@deck.gl/jupyter-widget' #16393

Open
bertcoerver opened this issue Jan 21, 2025 · 4 comments
Open

Widget load failure '@deck.gl/jupyter-widget' #16393

bertcoerver opened this issue Jan 21, 2025 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@bertcoerver
Copy link

Environment data

  • VS Code version: 1.96.3
  • Jupyter Extension version (available under the Extensions sidebar): 2024.11.0
  • Python Extension version (available under the Extensions sidebar): 2024.22.2
  • OS (Windows | Mac | Linux distro) and version: Mac 15.2
  • Python and/or Anaconda version: python 3.12.8 / conda 24.11.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Jupyter server running: Local | Remote | N/A
  • pydeck: 0.8.0
  • panel: 1.5.5

Created using conda create -n jupy-test -c conda-forge python jupyter_bokeh=4.0.5 pydeck=0.8 ipykernel panel

Expected behaviour

I'm trying to wrap a pydeck object in a Panel pane and display it in a Jupyter interactive window. A few months ago this was working.

Actual behaviour

When I create a pydeck, I'm seeing the following error:

09:59:37.281 [error] Widget load failure {} [ 'jsdelivr.com', 'unpkg.com' ] {
  className: 'JupyterTransportModel',
  moduleName: '@deck.gl/jupyter-widget',
  moduleVersion: '~8.8.*',
  isOnline: true,
  timedout: false,
  error: '{}'
}

Next everything seems to be working (I can see and interact with the pydeck), but when I try to wrap the pydeck object in a Panel pane the interactive Jupyter window doesn't show/load anything.

Steps to reproduce:

import panel as pn
import pydeck

print(f"pydeck: {pydeck.__version__}")
print(f"panel: {pn.__version__}")

pn.extension("deckgl")

if __name__ == "__main__":

    deck = pydeck.Deck(
                        map_style = "light",
                        tooltip = False,
                    )

    x = pn.pane.DeckGL(deck)

So deck does show up, but x doesn't work.

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

10:13:54.160 [info] Generated code for 5 = <ipython-input-5-f7c55f3b8e9b> with 16 lines
10:13:54.266 [error] Widget load failure {} [ 'jsdelivr.com', 'unpkg.com' ] {
  className: 'JupyterTransportModel',
  moduleName: '@deck.gl/jupyter-widget',
  moduleVersion: '~8.8.*',
  isOnline: true,
  timedout: false,
  error: '{}'
}
10:13:54.276 [error] Widget load failure {} [ 'jsdelivr.com', 'unpkg.com' ] {
  className: 'JupyterTransportModel',
  moduleName: '@deck.gl/jupyter-widget',
  moduleVersion: '~8.8.*',
  isOnline: true,
  timedout: false,
  error: '{}'
}
10:13:54.286 [error] Widget load failure {} [ 'jsdelivr.com', 'unpkg.com' ] {
  className: 'JupyterTransportModel',
  moduleName: '@deck.gl/jupyter-widget',
  moduleVersion: '~8.8.*',
  isOnline: true,
  timedout: false,
  error: '{}'
}
10:13:54.295 [error] Widget load failure {} [ 'jsdelivr.com', 'unpkg.com' ] {
  className: 'JupyterTransportModel',
  moduleName: '@deck.gl/jupyter-widget',
  moduleVersion: '~8.8.*',
  isOnline: true,
  timedout: false,
  error: '{}'
}
10:13:54.307 [error] Widget load failure {} [ 'jsdelivr.com', 'unpkg.com' ] {
  className: 'JupyterTransportModel',
  moduleName: '@deck.gl/jupyter-widget',
  moduleVersion: '~8.8.*',
  isOnline: true,
  timedout: false,
  error: '{}'
}

@bertcoerver bertcoerver added the bug Issue identified by VS Code Team member as probable bug label Jan 21, 2025
@DonJayamanne
Copy link
Contributor

Does this work for you in Jupyter Lab,
I'm unable to get this working in Jupyter lab, basically getting the exact same result.

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Jan 21, 2025
@DonJayamanne DonJayamanne self-assigned this Jan 21, 2025
@bertcoerver
Copy link
Author

bertcoerver commented Jan 21, 2025

Thanks @DonJayamanne

I just ran it in a Jupyter Lab and indeed here both deck and x show the output correctly (and nearly identical).

In VSCode, the output box for x does have the correct height, but it doesn't show any map.

@DonJayamanne
Copy link
Contributor

Please can you provide the list of packages and versions required to setup a conda env to get this working in Jupyter lab
Please include all steps when using a vanilla setup (i found some additional steps online for panel when using Jupyter lab, not site what’s required and what isn’t)
Optionally you can share a cons env yml file

Using that I can test Jupyter lab locally and figure out what’s required in vscode

@bertcoerver
Copy link
Author

Not sure if this is what you mean, because it is working in Jupyter Lab (i.e. its not reproducing the error), but here is the yml file for the environment that has the error in VSCode.

environment.yml.zip

name: jupy-test
channels:
  - conda-forge
  - defaults
dependencies:
  - appnope=0.1.4=pyhd8ed1ab_1
  - asttokens=3.0.0=pyhd8ed1ab_1
  - bleach=6.2.0=pyh29332c3_4
  - bokeh=3.6.2=pyhd8ed1ab_1
  - brotli-python=1.1.0=py312hde4cb15_2
  - bzip2=1.0.8=h99b78c6_7
  - ca-certificates=2024.12.14=hf0a4a13_0
  - certifi=2024.12.14=pyhd8ed1ab_0
  - cffi=1.17.1=py312h0fad829_0
  - charset-normalizer=3.4.1=pyhd8ed1ab_0
  - colorama=0.4.6=pyhd8ed1ab_1
  - comm=0.2.2=pyhd8ed1ab_1
  - contourpy=1.3.1=py312hb23fbb9_0
  - debugpy=1.8.12=py312hd8f9ff3_0
  - decorator=5.1.1=pyhd8ed1ab_1
  - exceptiongroup=1.2.2=pyhd8ed1ab_1
  - executing=2.1.0=pyhd8ed1ab_1
  - freetype=2.12.1=hadb7bae_2
  - h2=4.1.0=pyhd8ed1ab_1
  - hpack=4.0.0=pyhd8ed1ab_1
  - hyperframe=6.0.1=pyhd8ed1ab_1
  - idna=3.10=pyhd8ed1ab_1
  - importlib-metadata=8.6.1=pyha770c72_0
  - ipykernel=6.29.5=pyh57ce528_0
  - ipython=8.31.0=pyh707e725_0
  - ipywidgets=8.1.5=pyhd8ed1ab_1
  - jedi=0.19.2=pyhd8ed1ab_1
  - jinja2=3.1.5=pyhd8ed1ab_0
  - jupyter_bokeh=4.0.5=pyhd8ed1ab_1
  - jupyter_client=8.6.3=pyhd8ed1ab_1
  - jupyter_core=5.7.2=pyh31011fe_1
  - jupyterlab_widgets=3.0.13=pyhd8ed1ab_1
  - krb5=1.21.3=h237132a_0
  - lcms2=2.16=ha0e7c42_0
  - lerc=4.0.0=h9a09cb3_0
  - libblas=3.9.0=26_osxarm64_openblas
  - libcblas=3.9.0=26_osxarm64_openblas
  - libcxx=19.1.7=ha82da77_0
  - libdeflate=1.23=hec38601_0
  - libedit=3.1.20240808=pl5321hafb1f1b_0
  - libexpat=2.6.4=h286801f_0
  - libffi=3.4.2=h3422bc3_5
  - libgfortran=5.0.0=13_2_0_hd922786_3
  - libgfortran5=13.2.0=hf226fd6_3
  - libjpeg-turbo=3.0.0=hb547adb_1
  - liblapack=3.9.0=26_osxarm64_openblas
  - liblzma=5.6.3=h39f12f2_1
  - libopenblas=0.3.28=openmp_hf332438_1
  - libpng=1.6.45=h3783ad8_0
  - libsodium=1.0.20=h99b78c6_0
  - libsqlite=3.48.0=h3f77e49_0
  - libtiff=4.7.0=h551f018_3
  - libwebp-base=1.5.0=h2471fea_0
  - libxcb=1.17.0=hdb1d25a_0
  - libzlib=1.3.1=h8359307_2
  - linkify-it-py=2.0.3=pyhd8ed1ab_1
  - llvm-openmp=19.1.7=hdb05f8b_0
  - markdown=3.6=pyhd8ed1ab_0
  - markdown-it-py=3.0.0=pyhd8ed1ab_1
  - markupsafe=3.0.2=py312h998013c_1
  - matplotlib-inline=0.1.7=pyhd8ed1ab_1
  - mdit-py-plugins=0.4.2=pyhd8ed1ab_1
  - mdurl=0.1.2=pyhd8ed1ab_1
  - ncurses=6.5=h5e97a16_2
  - nest-asyncio=1.6.0=pyhd8ed1ab_1
  - numpy=1.26.4=py312h8442bc7_0
  - openjpeg=2.5.3=h8a3d83b_0
  - openssl=3.4.0=h81ee809_1
  - packaging=24.2=pyhd8ed1ab_2
  - pandas=2.2.3=py312hcd31e36_1
  - panel=1.5.5=pyhd8ed1ab_0
  - param=2.2.0=pyhd8ed1ab_0
  - parso=0.8.4=pyhd8ed1ab_1
  - pexpect=4.9.0=pyhd8ed1ab_1
  - pickleshare=0.7.5=pyhd8ed1ab_1004
  - pillow=11.1.0=py312h50aef2c_0
  - pip=24.3.1=pyh8b19718_2
  - platformdirs=4.3.6=pyhd8ed1ab_1
  - prompt-toolkit=3.0.50=pyha770c72_0
  - psutil=6.1.1=py312hea69d52_0
  - pthread-stubs=0.4=hd74edd7_1002
  - ptyprocess=0.7.0=pyhd8ed1ab_1
  - pure_eval=0.2.3=pyhd8ed1ab_1
  - pycparser=2.22=pyh29332c3_1
  - pydeck=0.8.0=pyhd8ed1ab_0
  - pygments=2.19.1=pyhd8ed1ab_0
  - pysocks=1.7.1=pyha55dd90_7
  - python=3.12.8=hc22306f_1_cpython
  - python-dateutil=2.9.0.post0=pyhff2d567_1
  - python-tzdata=2024.2=pyhd8ed1ab_1
  - python_abi=3.12=5_cp312
  - pytz=2024.1=pyhd8ed1ab_0
  - pyviz_comms=3.0.4=pyhd8ed1ab_1
  - pyyaml=6.0.2=py312h998013c_2
  - pyzmq=26.2.0=py312hf8a1cbd_3
  - readline=8.2=h92ec313_1
  - requests=2.32.3=pyhd8ed1ab_1
  - setuptools=75.8.0=pyhff2d567_0
  - six=1.17.0=pyhd8ed1ab_0
  - stack_data=0.6.3=pyhd8ed1ab_1
  - tk=8.6.13=h5083fa2_1
  - tornado=6.4.2=py312hea69d52_0
  - tqdm=4.67.1=pyhd8ed1ab_1
  - traitlets=5.14.3=pyhd8ed1ab_1
  - typing_extensions=4.12.2=pyha770c72_1
  - tzdata=2025a=h78e105d_0
  - uc-micro-py=1.0.3=pyhd8ed1ab_1
  - urllib3=2.3.0=pyhd8ed1ab_0
  - wcwidth=0.2.13=pyhd8ed1ab_1
  - webencodings=0.5.1=pyhd8ed1ab_3
  - wheel=0.45.1=pyhd8ed1ab_1
  - widgetsnbextension=4.0.13=pyhd8ed1ab_1
  - xorg-libxau=1.0.12=h5505292_0
  - xorg-libxdmcp=1.1.5=hd74edd7_0
  - xyzservices=2025.1.0=pyhd8ed1ab_0
  - yaml=0.2.5=h3422bc3_2
  - zeromq=4.3.5=hc1bb282_7
  - zipp=3.21.0=pyhd8ed1ab_1
  - zstandard=0.23.0=py312h15fbf35_1
  - zstd=1.5.6=hb46c0d2_0
prefix: /Users/hmcoerver/miniconda3/envs/jupy-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants