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

error when saving to HTML in JupyterLab 4 #1137

Open
rodrigo-j-goncalves opened this issue Sep 14, 2023 · 6 comments
Open

error when saving to HTML in JupyterLab 4 #1137

rodrigo-j-goncalves opened this issue Sep 14, 2023 · 6 comments

Comments

@rodrigo-j-goncalves
Copy link

When I try to save a map using JupyterLab 4.0.5 I get error.
However if I install the extension (which is suppose to be appropriate for JupyterLab <= 2) I get rid of the error.
See more details here

@kloczek
Copy link

kloczek commented Oct 4, 2023

Looks like generally ipyleaflet is not yet ready for jupyterlab 4.x because it has pinned jupyterlab 4.x on build stage

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
running egg_info
creating ipyleaflet.egg-info
writing ipyleaflet.egg-info/PKG-INFO
writing dependency_links to ipyleaflet.egg-info/dependency_links.txt
writing requirements to ipyleaflet.egg-info/requires.txt
writing top-level names to ipyleaflet.egg-info/top_level.txt
writing manifest file 'ipyleaflet.egg-info/SOURCES.txt'
reading manifest file 'ipyleaflet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
<string>:38: DeprecatedWarning: create_cmdclass is deprecated as of 0.8 and will be removed in 1.0. "
Use `wrap_installers` to handle prebuild steps in cmdclass.
Use `get_data_files` to handle data files.
Use `include_package_data=True` and `MANIFEST.in` for package data.

<string>:40: DeprecatedWarning: install_npm is deprecated as of 0.8 and will be removed in 1.0. Use `npm_builder` and `wrap_installers`
/usr/lib/python3.8/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!

        ********************************************************************************
        The license_file parameter is deprecated, use license_files instead.

        By 2023-Oct-30, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.

        See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
        ********************************************************************************

!!
  parsed = self.parsers.get(option_name, lambda x: x)(value)
warning: no files found matching '*.*' under directory 'ipyleaflet/nbextension'
warning: no files found matching '*.*' under directory 'ipyleaflet/labextension'
warning: no previously-included files found matching 'ipyleaflet/labextension/static/*.js.LICENSE.txt'
warning: no previously-included files found matching 'ipyleaflet/nbextension/*.js.LICENSE.txt'
adding license file 'LICENSE'
writing manifest file 'ipyleaflet.egg-info/SOURCES.txt'

ERROR Missing dependencies:
        jupyterlab<4,>=3.0.0

@martinRenou
Copy link
Member

Thank you for opening an issue. Looking at the error traceback, I don't think this has to do with JupyterLab 4 at all.

File ~/.virtualenvs/VirtEnvRG002_geo/lib/python3.10/site-packages/ipywidgets/widgets/widget.py:609, in Widget.get_state(self, key, drop_defaults)
    607 for k in keys:
    608     to_json = self.trait_metadata(k, 'to_json', self._trait_to_json)
--> 609     value = to_json(getattr(self, k), self)
    610     if not drop_defaults or not self._compare(value, traits[k].default_value):
    611         state[k] = value

File ~/.virtualenvs/VirtEnvRG002_geo/lib/python3.10/site-packages/ipywidgets/widgets/widget.py:54, in _widget_to_json(x, obj)
     52     return [_widget_to_json(v, obj) for v in x]
     53 elif isinstance(x, Widget):
---> 54     return "IPY_MODEL_" + x.model_id
     55 else:
     56     return x

File ~/.virtualenvs/VirtEnvRG002_geo/lib/python3.10/site-packages/ipywidgets/widgets/widget.py:546, in Widget.model_id(self)
    541 @property
    542 def model_id(self):
    543     """Gets the model id of this widget.
    544 
    545     If a Comm doesn't exist yet, a Comm will be created automagically."""
--> 546     return self.comm.comm_id

AttributeError: 'NoneType' object has no attribute 'comm_id'

This looks a lot like it has to do with the recent changes in ipywidgets regarding the comm creation. I can try to have a deeper look someday.

Looks like generally ipyleaflet is not yet ready for jupyterlab 4.x because it has pinned jupyterlab 4.x on build stage

ipyleaflet works with JupyterLab 4.x. It just does not build against it yet.

@giswqs
Copy link
Contributor

giswqs commented Oct 4, 2023

JupyterLab 4.x does not work properly with ipyleaflet yet. Just be aware

#1125

@jhgoebbert
Copy link

I came across this fork which claims to run with JupyterLab>4. Perhaps it is possible to merge the commits from there.
https://github.com/cdanielw/ipyleaflet

@jhgoebbert
Copy link

#1125 (comment)

@jhgoebbert
Copy link

#1146

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

5 participants