opengeos / leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
https://leafmap.org
MIT License
3.22k stars 386 forks source link

leafmap Docker container fails to start #509

Closed CloudNiner closed 1 year ago

CloudNiner commented 1 year ago

Environment Information

Description

Run the leafmap Docker image provided in the docs at https://leafmap.org/installation/#use-docker

What I Did

➜  ~/jupyter docker run -it -p 8899:8888 giswqs/leafmap:latest
Entered start.sh with args: jupyter lab
Executing the command: jupyter lab
Traceback (most recent call last):
  File "/opt/conda/bin/jupyter-lab", line 6, in <module>
    from jupyterlab.labapp import main
  File "/opt/conda/lib/python3.11/site-packages/jupyterlab/__init__.py", line 7, in <module>
    from .handlers.announcements import (  # noqa
  File "/opt/conda/lib/python3.11/site-packages/jupyterlab/handlers/announcements.py", line 14, in <module>
    from jupyter_server.base.handlers import APIHandler
  File "/opt/conda/lib/python3.11/site-packages/jupyter_server/base/handlers.py", line 23, in <module>
    from jupyter_events import EventLogger
  File "/opt/conda/lib/python3.11/site-packages/jupyter_events/__init__.py", line 3, in <module>
    from .logger import EVENTS_METADATA_VERSION, EventLogger
  File "/opt/conda/lib/python3.11/site-packages/jupyter_events/logger.py", line 18, in <module>
    from .schema import SchemaType
  File "/opt/conda/lib/python3.11/site-packages/jupyter_events/schema.py", line 18, in <module>
    from .validators import draft7_format_checker, validate_schema
  File "/opt/conda/lib/python3.11/site-packages/jupyter_events/validators.py", line 41, in <module>
    JUPYTER_EVENTS_SCHEMA_VALIDATOR = Draft7Validator(  # type: ignore
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: create.<locals>.Validator.__init__() got an unexpected keyword argument 'registry'
CloudNiner commented 1 year ago

Looks like pulling image tag v0.21.4 works:

➜  ~/jupyter docker run -it -p 8899:8888 giswqs/leafmap:v0.21.4
Entered start.sh with args: jupyter lab
Executing the command: jupyter lab
[I 2023-08-18 17:31:02.069 ServerApp] Package jupyterlab took 0.0000s to import
giswqs commented 1 year ago

Thanks for reporting. This issue has been fixed. Somehow there were some dependency conflicts. Pin jsonschema==4.18.0 solves the issue.