Browser console error: "jupyter.extensions.jupyter-leaflet failed to activate"
See original GitHub issueI’m configuring a JupyterLab (1.2.5) Docker environment, and I’m having a hard time getting ipyleaflet (0.12.3) to work consistently. When I create a simplified conda environment on my laptop with just JupyterLab, @jupyter-widgets/jupyterlab-manager
and jupyter-leaflet
, things work fine, but when I add in other libraries and plugins and deploy via a Docker image, ipyleaflet
stops displaying maps, usually stuck on “Loading widget…” or “Error displaying widget: model not found” showing up in the notebook cell output, and the following in the browser (Chrome) console:
jupyter.extensions.jupyter-leaflet failed to activate
Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead. Error
at A (http://localhost:8888/static/lab/vendors~main.8429b74936d96d40265a.js:1:418775)
at Function.D.extend (http://localhost:8888/static/lab/vendors~main.8429b74936d96d40265a.js:1:417777)
at Object.OTXi (http://localhost:8888/static/lab/vendors~main.8429b74936d96d40265a.js:1:2116586)
at n (http://localhost:8888/static/lab/main.54def8d69479e21e7b9a.js:1:875)
at Object.mGYY (http://localhost:8888/static/lab/vendors~main.8429b74936d96d40265a.js:1:3855130)
at n (http://localhost:8888/static/lab/main.54def8d69479e21e7b9a.js:1:875)
at Module.MIrW (http://localhost:8888/static/lab/vendors~main.8429b74936d96d40265a.js:1:1972447)
at n (http://localhost:8888/static/lab/main.54def8d69479e21e7b9a.js:1:875)
at Object.O3wJ (http://localhost:8888/static/lab/vendors~main.8429b74936d96d40265a.js:1:2106302)
at n (http://localhost:8888/static/lab/main.54def8d69479e21e7b9a.js:1:875)
A @ leaflet-src.js:400
...
index.js:267 Plugin 'jupyter.extensions.jupyter-leaflet' failed to activate.
...
Error: No provider for: jupyter.extensions.jupyterWidgetRegistry.
at f.e.resolveRequiredService (index.js:182)
at index.js:140
at Array.map (<anonymous>)
at f.e.activatePlugin (index.js:140)
at index.js:266
at Array.map (<anonymous>)
at f.e.start (index.js:265)
at a (index.out.js:1553)
...
Module jupyter-leaflet, semver range ^0.12.3 is not registered as a widget module
at k.loadClass (manager.js:305
(Note: other ipywidget components (buttons, sliders, etc.) work fine.)
To make matters more frustrating, if I force reinstall @jupyter-widgets/jupyterlab-manager
and jupyter-leaflet
from the JupyterLab terminal, hard reset the browser, and rerun the cells, sometimes the maps will show up. But not every time. 😕
I’m assuming that there’s a version conflict with another library causing all this, but after a week of chopping the environment up I’m still no further along, and running out of ideas.
Any tips on additional things to try would be appreciated. Maybe a pointer to what role jupyter.extensions.jupyterWidgetRegistry
plays and why it wouldn’t be found by the notebook plugin.
Jupyter Conda Environment
$ conda env export name: base channels: - conda-forge - defaults dependencies: - _libgcc_mutex=0.1=conda_forge - _openmp_mutex=4.5=0_gnu - alembic=1.4.2=pyh9f0ad1d_0 - async_generator=1.10=py_0 - attrs=19.3.0=py_0 - backcall=0.1.0=py_0 - bleach=3.1.4=pyh9f0ad1d_0 - blinker=1.4=py_1 - branca=0.3.1=py_0 - ca-certificates=2019.11.28=hecc5488_0 - certifi=2019.11.28=py37hc8dfbb8_1 - certipy=0.1.3=py_0 - cffi=1.14.0=py37hd463f26_0 - chardet=3.0.4=py37hc8dfbb8_1006 - conda=4.8.3=py37hc8dfbb8_1 - conda-package-handling=1.6.0=py37h8f50634_2 - configurable-http-proxy=4.2.1=node13_he01fd0c_0 - cryptography=2.8=py37hb09aad4_2 - decorator=4.4.2=py_0 - defusedxml=0.6.0=py_0 - entrypoints=0.3=py37hc8dfbb8_1001 - icu=64.2=he1b5a44_1 - idna=2.9=py_1 - importlib-metadata=1.6.0=py37hc8dfbb8_0 - importlib_metadata=1.6.0=0 - ipykernel=5.2.0=py37h43977f1_1 - ipyleaflet=0.12.3=py_1 - ipython=7.13.0=py37hc8dfbb8_2 - ipython_genutils=0.2.0=py_1 - ipywidgets=7.5.1=py_0 - jedi=0.16.0=py37hc8dfbb8_1 - jinja2=2.11.1=py_0 - json5=0.9.0=py_0 - jsonschema=3.2.0=py37hc8dfbb8_1 - jupyter_client=6.1.2=py_0 - jupyter_core=4.6.3=py37hc8dfbb8_1 - jupyter_telemetry=0.0.5=py_0 - jupyterhub=1.1.0=py37_2 - jupyterhub-base=1.1.0=py37_2 - jupyterlab=1.2.5=py_0 - jupyterlab_server=1.1.0=py_0 - krb5=1.16.4=h2fd8d38_0 - ld_impl_linux-64=2.34=h53a641e_0 - libblas=3.8.0=14_openblas - libcblas=3.8.0=14_openblas - libcurl=7.68.0=hda55be3_0 - libedit=3.1.20170329=hf8c457e_1001 - libffi=3.2.1=he1b5a44_1007 - libgcc-ng=9.2.0=h24d8f2e_2 - libgfortran-ng=7.3.0=hdf63c60_5 - libgomp=9.2.0=h24d8f2e_2 - liblapack=3.8.0=14_openblas - libopenblas=0.3.7=h5ec1e0e_6 - libsodium=1.0.17=h516909a_0 - libssh2=1.8.2=h22169c7_2 - libstdcxx-ng=9.2.0=hdf63c60_2 - libuv=1.34.0=h516909a_0 - mako=1.1.0=py_0 - markupsafe=1.1.1=py37h8f50634_1 - mistune=0.8.4=py37h516909a_1000 - nbconvert=5.6.1=py37_0 - nbformat=5.0.4=py_0 - ncurses=6.1=hf484d3e_1002 - nodejs=13.10.1=hf5d1a2b_0 - notebook=6.0.3=py37_0 - numpy=1.18.1=py37h8960a57_1 - oauthlib=3.0.1=py_0 - openssl=1.1.1f=h516909a_0 - pamela=1.0.0=py_0 - pandas=1.0.3=py37h0da4684_0 - pandoc=2.9.2=0 - pandocfilters=1.4.2=py_1 - parso=0.6.2=py_0 - pexpect=4.8.0=py37hc8dfbb8_1 - pickleshare=0.7.5=py37hc8dfbb8_1001 - pip=20.0.2=py_2 - prometheus_client=0.7.1=py_0 - prompt-toolkit=3.0.5=py_0 - ptyprocess=0.6.0=py_1001 - pycosat=0.6.3=py37h8f50634_1004 - pycparser=2.20=py_0 - pycurl=7.43.0.5=py37h16ce93b_0 - pygments=2.6.1=py_0 - pyjwt=1.7.1=py_0 - pyopenssl=19.1.0=py_1 - pyrsistent=0.16.0=py37h8f50634_0 - pysocks=1.7.1=py37hc8dfbb8_1 - python=3.7.6=h8356626_5_cpython - python-dateutil=2.8.1=py_0 - python-editor=1.0.4=py_0 - python-json-logger=0.1.11=py_0 - python_abi=3.7=1_cp37m - pytz=2019.3=py_0 - pyzmq=19.0.0=py37hac76be4_1 - readline=8.0=hf8c457e_0 - requests=2.23.0=pyh8c360ce_2 - ruamel.yaml=0.16.6=py37h8f50634_1 - ruamel.yaml.clib=0.2.0=py37h8f50634_1 - ruamel_yaml=0.15.80=py37h8f50634_1001 - send2trash=1.5.0=py_0 - setuptools=46.1.3=py37hc8dfbb8_0 - six=1.14.0=py_1 - sqlalchemy=1.3.15=py37h8f50634_1 - sqlite=3.30.1=hcee41ef_0 - terminado=0.8.3=py37hc8dfbb8_1 - testpath=0.4.4=py_0 - tini=0.18.0=h14c3975_1001 - tk=8.6.10=hed695b0_0 - tornado=6.0.4=py37h8f50634_1 - tqdm=4.45.0=pyh9f0ad1d_0 - traitlets=4.3.3=py37hc8dfbb8_1 - traittypes=0.2.1=py_1 - urllib3=1.25.7=py37hc8dfbb8_1 - wcwidth=0.1.9=pyh9f0ad1d_0 - webencodings=0.5.1=py_1 - wheel=0.34.2=py_1 - widgetsnbextension=3.5.1=py37_0 - xarray=0.15.1=py_0 - xz=5.2.4=h516909a_1002 - yaml=0.2.2=h516909a_1 - zeromq=4.3.2=he1b5a44_2 - zipp=3.1.0=py_0 - zlib=1.2.11=h516909a_1006 - pip: - beautifulsoup4==4.8.2 - bs4==0.0.1 - jupyterlab-spark-ui-tab==0.0.2 - soupsieve==2.0 prefix: /opt/conda
jupyter labextension list
$ jupyter labextension list JupyterLab v1.2.5 Known labextensions: app dir: /opt/conda/share/jupyter/lab @jupyter-widgets/jupyterlab-manager v1.1.0 enabled OK jupyter-leaflet v0.12.3 enabled OK
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (2 by maintainers)
Top GitHub Comments
@martinRenou I just rebuilt with
0.12.6
and I’m back to theError displaying widget: model not found
message in the Jupyter output cell. In the browser console the error isUncaught (in promise) Error: Module jupyter-leaflet, semver range ^0.12.6 is not registered as a widget module
Here’s the current set of plugins. Has anyone else reported anything similar? Or am I a snowflake ❄️ here? 😄
jupyter labextension list
Confirmation: I pinned the following versions and things are now working 😅 :
@jupyter-widgets/jupyterlab-manager@1.1
ipyleaflet==0.12.2
jupyter-leaflet@0.12.2