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

[Bug][Jupyter Widget] Error displaying widget: model not found (still) #1165

Open
khof312 opened this issue Jun 22, 2020 · 5 comments
Open
Assignees
Labels
jupyter keplergl for Jupyter

Comments

@khof312
Copy link

khof312 commented Jun 22, 2020

Description
I have been struggling with the problem described in this issue and this one for a few days now. I've tried the instructions but they don't seem to fix the problem. I can't reopen the issue so I have created a new one here.

To Reproduce
When I type:

from keplergl import KeplerGl
map_1 = KeplerGl()
map_1

I get:

User Guide: https://docs.kepler.gl/docs/keplergl-jupyter
Error displaying widget: model not found

Developer console error:

manager.js:319 Uncaught (in promise) Error: Module keplergl-jupyter, semver range ^0.2.0 is not registered as a widget module
    at WidgetManager.loadClass (manager.js:319)
    at WidgetManager.<anonymous> (manager-base.js:264)
    at step (manager-base.js:45)
    at Object.next (manager-base.js:26)
    at manager-base.js:20
    at new Promise (<anonymous>)
    at push.SEna.__awaiter (manager-base.js:16)
    at WidgetManager.push.SEna.ManagerBase._make_model (manager-base.js:258)
    at WidgetManager.<anonymous> (manager-base.js:247)
    at step (manager-base.js:45)

Expected behavior
I expect to see a slippy map.

Environment (please complete the following information):

  • Python 3.6.8
  • Windows 10
    jupyter --version
jupyter core     : 4.6.3
jupyter-notebook : 6.0.3
qtconsole        : 4.7.5
ipython          : 7.15.0
ipykernel        : 5.3.0
jupyter client   : 6.1.3
jupyter lab      : 2.1.4
nbconvert        : 5.6.1
ipywidgets       : 7.5.1
nbformat         : 5.0.6
traitlets        : 4.3.3

jupyter labextension list

JupyterLab v2.1.4
Known labextensions:
   app dir: C:\Users\[USER]\.conda\envs\py36\share\jupyter\lab
        @jupyter-widgets/jupyterlab-manager v2.0.0 enabled  ok
        @jupyterlab/toc v3.0.0 enabled  ok
        js v0.1.0 enabled  ok
        jupyter-gmaps v0.9.0 enabled  ok
        jupyter-leaflet v0.13.0 enabled  ok
        jupyterlab-jupytext v1.2.1 enabled  ok
        jupyterlab-stata-highlight v0.1.1 enabled  ok
        keplergl-jupyter v0.2.0 enabled  ok

Additional context
The problem seems to affect any extensions with a slippy map, including gmaps and ipyleaflet. I believe it arose when I downloaded and started to use kepler (probably from updating some packages in the process?) since gmaps used to work. To be clear, it's fine in Jupyter notebook, just not in lab.

Any thoughts would be much appreciated!

@khof312 khof312 added the jupyter keplergl for Jupyter label Jun 22, 2020
@imaginefish
Copy link

I also got the same bug report with jupyter lab, but jupyter notebook works.

  • python error

Error displaying widget: model not found

  • console error

renderer.js:45 Error: widget model not found
at C.get_model (manager.js:375)
at h.renderModel (renderer.js:38)
renderModel @ renderer.js:45

  • macOS version: 10.15.6
  • node version: v12.18.3
  • keplergl vesion: 0.2.0

Here are my jupyter version:

jupyter core : 4.6.3
jupyter-notebook : 6.1.1
qtconsole : 4.7.5
ipython : 7.16.1
ipykernel : 5.3.4
jupyter client : 6.1.6
jupyter lab : 2.1.5
nbconvert : 5.6.1
ipywidgets : 7.5.1
nbformat : 5.0.7
traitlets : 4.3.3

All jupyter lab extensions are installed and enabled:

JupyterLab v2.1.5
Known labextensions:
app dir: /opt/anaconda3/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK
keplergl-jupyter v0.2.0 enabled OK

I guess there are still some bugs when using jupyter lab in current version of keplergl(0.2.0), hope someone can fix it.

@kuanb
Copy link

kuanb commented Feb 24, 2021

Same issue here:

vendors~main.accab467ede46e07a003.js:2 Uncaught (in promise) Error: Module keplergl-jupyter, semver range ^0.2.0 is not registered as a widget module
    at C.loadClass (vendors~main.accab467ede46e07a003.js:2)
    at C.<anonymous> (vendors~main.accab467ede46e07a003.js:2)
    at l (vendors~main.accab467ede46e07a003.js:2)
    at Object.next (vendors~main.accab467ede46e07a003.js:2)
    at vendors~main.accab467ede46e07a003.js:2
    at new Promise (<anonymous>)
    at Rtm6.S (vendors~main.accab467ede46e07a003.js:2)
    at C.e._make_model (vendors~main.accab467ede46e07a003.js:2)
    at C.<anonymous> (vendors~main.accab467ede46e07a003.js:2)
    at l (vendors~main.accab467ede46e07a003.js:2)

Got "this far" by following instructions outlined on this post.

@ramayer
Copy link

ramayer commented Mar 24, 2021

The best workaround I found so far is to wrap it in an iframe like this:

import keplergl
import base64

map1      = keplergl.KeplerGl()
orig_html = str(map1._repr_html_(),'utf-8')
b64d_html = base64.b64encode(orig_html.encode('utf-8')).decode('utf-8')
framed_html = f'<iframe src="data:text/html;base64,{b64d_html}" style="width:95%; height: 600px">'
import IPython
IPython.display.HTML(framed_html)

@adaaaaaa
Copy link

adaaaaaa commented Jul 7, 2021

in jupyterlab I get an empty map...@ramayer
jupyter --version
jupyter core : 4.7.1
jupyter-notebook : 6.4.0
qtconsole : not installed
ipython : 7.25.0
ipykernel : 6.0.1
jupyter client : 6.2.0
jupyter lab : 3.0.16
nbconvert : 6.0.7
ipywidgets : 7.6.3
nbformat : 5.1.3
traitlets : 5.0.5

@adaaaaaa
Copy link

adaaaaaa commented Jul 7, 2021

from keplergl import KeplerGl
map_1 = KeplerGl()
map_1

get the same error

User Guide: https://docs.kepler.gl/docs/keplergl-jupyter
Error displaying widget: model not found

lixun910 added a commit to lixun910/kepler.gl that referenced this issue Aug 13, 2021
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888305 -0700

parent d7afdd6
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888276 -0700

parent d7afdd6
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888217 -0700

Create build-publish-pypi.yml

Add GitHub Actions to build and publish keplergl python package to PyPI

Update build-publish-pypi.yml

Add mapbox token secret
fix artifact path
fix condition to publish to pypi

Update build-publish-pypi.yml

fix path in upload-artifact and publish pypi

Update build-publish-pypi.yml

add Check KeplerGL Installation
add Test Notebook DataFrame.ipynb

Update build-publish-pypi.yml

update test KeplerGL

Update build-publish-pypi.yml

The keplergl-jupyter widget needs to be updated for JupyterLab 3 keplergl#882 keplergl#1565 keplergl#1165

Update build-publish-pypi.yml

add jupyter-packaging

Update build-publish-pypi.yml

add jupyter for jupyter labextension build

Update build-publish-pypi.yml

add jupyterlab

Add support to Google colab keplergl#931

Update build-publish-pypi.yml

fix path in upload-artifact and publish pypi

Signed-off-by: Xun Li <[email protected]>

Update build-publish-pypi.yml

Signed-off-by: Xun Li <[email protected]>

The keplergl-jupyter widget needs to be updated for JupyterLab 3 keplergl#882 keplergl#1565 keplergl#1165

Signed-off-by: Xun Li <[email protected]>

Update build-publish-pypi.yml

add jupyterlab

Signed-off-by: Xun Li <[email protected]>

Add support to Google colab keplergl#931

Signed-off-by: Xun Li <[email protected]>
lixun910 added a commit to lixun910/kepler.gl that referenced this issue Aug 13, 2021
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888305 -0700

parent d7afdd6
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888276 -0700

parent d7afdd6
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888217 -0700

Create build-publish-pypi.yml

Add GitHub Actions to build and publish keplergl python package to PyPI

Update build-publish-pypi.yml

Add mapbox token secret
fix artifact path
fix condition to publish to pypi

Update build-publish-pypi.yml

fix path in upload-artifact and publish pypi

Update build-publish-pypi.yml

add Check KeplerGL Installation
add Test Notebook DataFrame.ipynb

Update build-publish-pypi.yml

update test KeplerGL

Update build-publish-pypi.yml

The keplergl-jupyter widget needs to be updated for JupyterLab 3 keplergl#882 keplergl#1565 keplergl#1165

Update build-publish-pypi.yml

add jupyter-packaging

Update build-publish-pypi.yml

add jupyter for jupyter labextension build

Update build-publish-pypi.yml

add jupyterlab

Add support to Google colab keplergl#931

Update build-publish-pypi.yml

fix path in upload-artifact and publish pypi

Signed-off-by: Xun Li <[email protected]>

Update build-publish-pypi.yml

Signed-off-by: Xun Li <[email protected]>

The keplergl-jupyter widget needs to be updated for JupyterLab 3 keplergl#882 keplergl#1565 keplergl#1165

Signed-off-by: Xun Li <[email protected]>

Update build-publish-pypi.yml

add jupyterlab

Signed-off-by: Xun Li <[email protected]>

Add support to Google colab keplergl#931

Signed-off-by: Xun Li <[email protected]>
lixun910 added a commit to lixun910/kepler.gl that referenced this issue Aug 13, 2021
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888305 -0700

parent d7afdd6
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888276 -0700

parent d7afdd6
author Xun Li <[email protected]> 1628282154 -0700
committer Xun Li <[email protected]> 1628888217 -0700

Create build-publish-pypi.yml

Add GitHub Actions to build and publish keplergl python package to PyPI

Update build-publish-pypi.yml

Add mapbox token secret
fix artifact path
fix condition to publish to pypi

Update build-publish-pypi.yml

fix path in upload-artifact and publish pypi

Update build-publish-pypi.yml

add Check KeplerGL Installation
add Test Notebook DataFrame.ipynb

Update build-publish-pypi.yml

update test KeplerGL

Update build-publish-pypi.yml

The keplergl-jupyter widget needs to be updated for JupyterLab 3 keplergl#882 keplergl#1565 keplergl#1165

Update build-publish-pypi.yml

add jupyter-packaging

Update build-publish-pypi.yml

add jupyter for jupyter labextension build

Update build-publish-pypi.yml

add jupyterlab

Add support to Google colab keplergl#931

Update build-publish-pypi.yml

fix path in upload-artifact and publish pypi

Signed-off-by: Xun Li <[email protected]>

Update build-publish-pypi.yml

Signed-off-by: Xun Li <[email protected]>

The keplergl-jupyter widget needs to be updated for JupyterLab 3 keplergl#882 keplergl#1565 keplergl#1165

Signed-off-by: Xun Li <[email protected]>

Update build-publish-pypi.yml

add jupyterlab

Signed-off-by: Xun Li <[email protected]>

Add support to Google colab keplergl#931

Signed-off-by: Xun Li <[email protected]>

allow height option to work in google colab

Signed-off-by: Xun Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jupyter keplergl for Jupyter
Projects
None yet
Development

No branches or pull requests

6 participants