Skip to content

Panel not working with mapwidget.cesium: Class null not found in module @jupyter-widgets/base@2.0.0 #88 #12

@MarcSkovMadsen

Description

@MarcSkovMadsen

It is unclear to me which package is responsible for this error. So I've crossposted to

Environment Information

  • mapwidget version: 0.1.2
  • Python version: 3.9
  • Operating System: Windows

Description

I would like to use Panel with mapwidget.cesium. Panel works with (some) ipywidgets via ipywidgets-bokeh.

Exception

Class null not found in module @jupyter-widgets/base@2.0.0      ipywidgets_bokeh.js?v=59296d23d623ce0adf7675d22156e83b1248c8508135a65dd8a9e38c497e94a8:8 

image

Reproducible Example

pip install panel==0.14.1 ipywidgets-bokeh==1.3.0 mapwidget==0.1.2

Other versions: ipywidgets-8.0.5 jupyterlab-widgets-3.0.6 widgetsnbextension-4.0.6 anywidget-0.2.0

mapwidget_app.py

import os
import mapwidget.cesium as mapwidget
import panel as pn

pn.extension("ipywidgets")

try:
    token = os.environ['CESIUM_TOKEN']
except KeyError as ex:
    raise EnvironmentError(
        "CESIUM_TOKEN environment variable not set. "
        "Sign up for free and get a free Cesium token here https://ion.cesium.com/signup/"
        ) from ex

cesium_map = mapwidget.Map(center=[40.70605, -74.01177], altitude=600, height='600px', token=token)
pn.panel(cesium_map).servable()
panel serve mapwidget_app.py

Open: http://localhost:5006/mapwidget_app and see the exception in the browsers console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions