visgl / visgl/deck.gl

[Bug] TypeError: Cannot read properties of undefined (reading 'extend') in pydeck Jupyter Widget

Open
#8,596 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug pydeck
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Description

Description:

The error in question occurs on loading the jupyterlab UI, is present in the browser console, and prevents the deck.gl widget from loading when used in notebooks.

Actual Behavior:

The following error message appears in the browser console:

index.out.js:687 TypeError: Cannot read properties of undefined (reading 'extend')
Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS
Expected Behavior

Expected Behavior:

The jupyter widget should load successfully without errors.

Steps to Reproduce

Steps to Reproduce:

  1. Run the following commands (from https://deckgl.readthedocs.io/en/latest/contributing.html):

    # Build and prepare pydeck + jupyter extension
    git clone https://github.com/ClayMav/deck.gl # My fork contains some fixes to even get this far
    cd deck.gl/bindings/pydeck
    make setup-env
    . env/bin/activate
    make init
    make prepare-jupyter
    
    # Run jupyter lab
    jupyter lab
    
  2. Open the web UI and inspect the console

Additional Information:

Output from jupyter labextension list: (to show that the extension is being loaded successfully)

Note: The extension is also shown in the extensions section of the jupyterlab interface.

JupyterLab v4.1.3
/opt/homebrew/share/jupyter/labextensions
        jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
        jupyter-leaflet v0.18.1 enabled OK
        @jupyter-widgets/jupyterlab-manager v5.0.10 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /Volumes/CaseSensitive/deck.gl/bindings/pydeck/env/share/jupyter/lab
        @deck.gl/jupyter-widget v9.0.0-beta.6 enabled OK*


   local extensions:
        @deck.gl/jupyter-widget: /Volumes/CaseSensitive/deck.gl/modules/jupyter-widget

We suspect the issue might be related to a missing dependency in the jupyter-widget module but are unable to pinpoint the exact cause.

Request:

Any insights or suggestions to help identify the cause of this error and potential solutions would be greatly appreciated.

Environment
  • Framework version: deck.gl@9.0.0-beta.6
  • Browser: Chrome 1.62.162
  • OS: MacOS 13.6.3 (22G436) (Arm)
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure from bindings/pydeck using make setup-env, make init, make prepare-jupyter, then run jupyter lab and inspect the browser console. Compare the jupyter-widget module and the index.out.js location named in the error, focusing on the suspected missing dependency. Done means the @deck.gl/jupyter-widget loads in JupyterLab without the TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, jupyter-notebook, python, typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.