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

ipyleaflet 0.19.0 can't be installed with nbextension #1195

Closed
ancestor-mithril opened this issue May 2, 2024 · 1 comment
Closed

ipyleaflet 0.19.0 can't be installed with nbextension #1195

ancestor-mithril opened this issue May 2, 2024 · 1 comment

Comments

@ancestor-mithril
Copy link

Version 0.18.0 works

pip install ipyleaflet==0.18.0
jupyter nbextension enable --py --sys-prefix ipyleaflet

The last release doesn't work anymore:

pip install ipyleaflet==0.19.0
jupyter nbextension enable --py --sys-prefix ipyleaflet

The error is :

Traceback (most recent call last):
  File "/opt/conda/bin/jupyter-nbextension", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/jupyter_core/application.py", line 283, in launch_instance
    super().launch_instance(argv=argv, **kwargs)
  File "/opt/conda/lib/python3.11/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/opt/conda/lib/python3.11/site-packages/notebook/nbextensions.py", line 972, in start
    super().start()
  File "/opt/conda/lib/python3.11/site-packages/jupyter_core/application.py", line 270, in start
    self.subapp.start()
  File "/opt/conda/lib/python3.11/site-packages/notebook/nbextensions.py", line 882, in start
    self.toggle_nbextension_python(self.extra_args[0])
  File "/opt/conda/lib/python3.11/site-packages/notebook/nbextensions.py", line 855, in toggle_nbextension_python
    return toggle(module,
           ^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/notebook/nbextensions.py", line 470, in enable_nbextension_python
    return _set_nbextension_state_python(True, module, user, sys_prefix,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/notebook/nbextensions.py", line 368, in _set_nbextension_state_python
    m, nbexts = _get_nbextension_metadata(module)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/notebook/nbextensions.py", line 1109, in _get_nbextension_metadata
    raise KeyError(
KeyError: 'The Python module ipyleaflet is not a valid nbextension, it is missing the `_jupyter_nbextension_paths()` method.'

Environment

Docker container based on nvidia/cuda.

@maartenbreddels
Copy link
Member

Hi,

There is not a need anymore for the enable command. Modern notebook (at least v6, maybe even in v5) can auto enabled widgets and other nbextensions. Which means it should work without this command.

Regads,

Maarten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants