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
Failed to load model class 'LeafletMapModel' from module 'jupyter-leaflet' #1142
Comments
I have the same issue on my VM on vertex AI workbench. On my conda environment "geemap" and other related modules/packages are installed. Nevertheless I can not visualize the map. |
I have also faced the same issue in a fresh Anaconda3 installation and following the ipyleaflet installation documentation When I run the first example from the documentation from ipyleaflet import Map, Marker
center = (52.204793, 360.121558)
m = Map(center=center, zoom=15)
marker = Marker(location=center, draggable=True)
m.add(marker);
display(m)
# Now that the marker is on the Map, you can drag it with your mouse,
# it will automatically update the `marker.location` attribute in Python
# You can also update the marker location from Python, that will update the
# marker location on the Map:
marker.location = (50, 356) I run into the following error
|
Did you try creating a new conda env to install the packages? |
@giswqs Thanks for the response It's a new env and a new conda python installation |
How did you create the conda env and install the packages? |
This is basically what I have done conda create -n pyGIS started installationsconda install conda-forge::geopandas in order to add the env to jupyterconda install conda-forge::ipykernel add environpython -m ipykernel install --user --name=pyGIS thenconda install conda-forge::geemap conda install conda-forge::geehydro #======================================================= then opened a notebook & switched to the envimport geemap ee authee.Authenticate() initee.Initialize() ... aw_dem = ee.ImageCollection("JAXA/ALOS/AW3D30/V3_2") test plotMap = geemap.Map() and the error shows up |
Try the following. Make sure ipyleaflet works properly before installing other packages. conda create -n gee python=3.11 |
I have installed but I am still getting the same error But I saw a number of warnings pertaining to libmamba ( warning libmamba) during the installations, I do not know if they have any effect e.g. warning libmamba Extracted package cache 'C:\Users\yyy\anaconda3\pkgs\msys2-conda-epoch-20160418-1' has invalid size After installaton, I have also run : C:\Users\yyy>jupyter labextension list And I am getting:
The following extensions are outdated: Consider checking if an update is available for these packages. I do not know if the "outdated" packages have an effect |
Environment Information
ipyleaflet v.0.17.4
Python version: 3.12.0
Operating System: Ubuntu 20.04
Description
I've been trying to get a GPU-enabled docker container running with the segment anything geospatial package. I'm running a docker container of GPU Jupyter, which are GPU enabled jupyter environments. My main issue has been getting leafmap/ipyleaflet to work in this environment. After creating a fresh conda environment and installing ipyleaflet, attempting to create a map results in a javascript error in the jupyter notebook.
And the error:
I've tried upgrading and downgrading notebook, and ipyleaflet because I've seen some discussion that similar errors might result from version mismatches, but so far I've had no luck in resolving this issue. Any help appreciated!
The text was updated successfully, but these errors were encountered: