question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors when `@jupyterlab/geojson-extension` and `jupyter-leaflet` are both enabled

See original GitHub issue

Not sure where to report this issue as it is an interaction between

@jupyterlab/geojson-extension v0.18.1
jupyter-leaflet v0.10.1

using:

jupyter-lab --version is 0.35.4

Individually both extensions work so long as the other one is disabled (I’m disabling at user level), but if both are enabled none work. They break with different error messages to the javascript console.

I’m not trying to use both in one notebook, separate notebooks

  • Test notebook for GeoJSON
from IPython.display import GeoJSON
GeoJSON({
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [-118.4563712, 34.0163116]
    }
})
  • Test notebook for ipyleaflet
from ipyleaflet import Map
Map(zoom=2)

Looks like some sort of vendor package clashing issue.

Links:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Kirill888commented, Apr 23, 2019

This is environment I’m testing in:

#!/bin/bash
set -e -u
env_path="$(pwd)/jup"
python3 -m venv "${env_path}"
source "${env_path}/bin/activate"
which pip
pip install --upgrade pip
pip install jupyterlab ipywidgets ipyleaflet
jupyter-labextension install --no-build @jupyter-widgets/jupyterlab-manager
jupyter-labextension install --no-build jupyter-leaflet
jupyter-labextension install --no-build @jupyterlab/geojson-extension
jupyter lab build

On first load there is this warning

Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead. checkDeprecatedMixinEvents@http://localhost:8888/lab/static/vendors~main.1e93c2b700311c8f2422.js:19905:47
4R65/</Class.extend@http://localhost:8888/lab/static/vendors~main.1e93c2b700311c8f2422.js:19833:3
OTXi@http://localhost:8888/lab/static/vendors~main.1e93c2b700311c8f2422.js:104879:22
__webpack_require__@http://localhost:8888/lab/static/main.129b72774f1aafaeff51.js:84:12
mGYY@http://localhost:8888/lab/static/vendors~main.1e93c2b700311c8f2422.js:212018:1
__webpack_require__@http://localhost:8888/lab/static/main.129b72774f1aafaeff51.js:84:12
MIrW@http://localhost:8888/lab/static/vendors~main.1e93c2b700311c8f2422.js:98160:9
__webpack_require__@http://localhost:8888/lab/static/main.129b72774f1aafaeff51.js:84:12
O3wJ@http://localhost:8888/lab/static/vendors~main.1e93c2b700311c8f2422.js:103903:13
__webpack_require__@http://localhost:8888/lab/static/main.129b72774f1aafaeff51.js:84:12
xtrE@http://localhost:8888/lab/static/vendors~main.1e93c2b700311c8f2422.js:265343:18
__webpack_require__@http://localhost:8888/lab/static/main.129b72774f1aafaeff51.js:84:12
12aA@http://localhost:8888/lab/static/vendors~main.1e93c2b700311c8f2422.js:11479:23
__webpack_require__@http://localhost:8888/lab/static/main.129b72774f1aafaeff51.js:84:12
main@http://localhost:8888/lab/static/main.129b72774f1aafaeff51.js:1614:16
leaflet-src.js:400
Existing `L` detected, running ipyleaflet's Leaflet in no-conflict mode as `ipyL`

then when displaying Map this is printed to js console

TypeError: "this.obj is undefined"
    processPhosphorMessage Map.js:266
    processMessage widget.js:666
    invokeHandler index.js:433
    sendMessage index.js:169
    runMessageLoop index.js:483
index.js:380
TypeError: L is undefined[Learn More] leaflet.draw.js:9:7373
0reactions
drwelbycommented, May 5, 2019

@Kirill888 good debugging work and I like your solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recommended ways of debugging JupyterLab
At one point I was able to open a .geojson file and get a map ... `@jupyterlab/geojson-extension` and `jupyter-leaflet` are both enabled.
Read more >
3.6. Introducing JupyterLab - IPython Cookbook
In a word, JupyterLab is a web-based, hackable IDE for data science and interactive computing. JupyterLab uses the exact same Notebook server and...
Read more >
Extension Developer Guide - JupyterLab Documentation
Installing a prebuilt extensions does not require Node.js. An extension can be published both as a source extension on NPM and as a...
Read more >
jupyter-leaflet | Yarn - Package Manager
The package now ships the JupyterLab extension automatically. · Add support for int data in Choropleth #539 · Add style_callback to GeoJSON/Choropleth/GeoData ...
Read more >
ipyleaflet map not rendering in jupyter notebook on install
I received the same error while running Jupyter Notebook but restarting the kernel, and closing and reopening that file worked for me.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found