Comments (5)
This is always an ipylealfet installation issue. Try creating a fresh conda env to install geemap.
conda create -n gee python=3.11
conda activate gee
conda install geemap -c conda-forge
from geemap.
@giswqs
Is there a way to understand this problem better?
What issue in particular related to ipyleaflet do you think it generates this problem?
I am asking this because many times we need other packages in a project and it doesn't seem ideal to to create a separate environment just for gee.
Also:
I just did what you suggested, then I added the new environment to jupyter and it is reproducing exactly the same problem.
Any suggestions?
from geemap.
This is quite a common issue that comes up from time to time. Try the following. If it does not work, then it is an ipyleaflet installation issue. Creating a fresh con env usually should resolves the issue. If it does not, then it is probably because your jupyter environment has some restrictions that prevents the leaflet JS compoents from being loaded properly. If this is the case, you can report it to the ipyleaflet repo.
import ipyleaflet
m = ipyleaflet.Map()
m
Relevant issues:
from geemap.
This is quite a common issue that comes up from time to time. Try the following. If it does not work, then it is an ipyleaflet installation issue. Creating a fresh con env usually should resolves the issue. If it does not, then it is probably because your jupyter environment has some restrictions that prevents the leaflet JS compoents from being loaded properly. If this is the case, you can report it to the ipyleaflet repo.
import ipyleaflet m = ipyleaflet.Map() mRelevant issues:
Thanks for the quick response.
I just tried what you suggested and indeed, this is a problem with ipyleaflet.
Why it doesn't happen with folium? π€
I tried what is suggested in the documentation.
I installed ipyleaflet
and nodejs
to the base environment that I use to run jupyterlab.
then
jupyter lab build
jupyter labextension install jupyter-leaflet
When I do
jupyter labextension list
it returns
JupyterLab v4.1.6
/home/iury/miniforge3/share/jupyter/labextensions
jupyter-leaflet v0.19.1 enabled OK
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
jupyterlab-quarto v0.2.8 enabled OK (python, jupyterlab-quarto)
@jupyter-widgets/jupyterlab-manager v5.0.11 enabled OK (python, jupyterlab_widgets)
@pyviz/jupyterlab_pyviz v3.0.0 enabled OK
Other labextensions (built into JupyterLab)
app dir: /home/iury/miniforge3/share/jupyter/lab
Even with all of this, I receive the following error when trying to load the map.
[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'LeafletMapModel' from module 'jupyter-leaflet'
Error: Module jupyter-leaflet, version ^0.18 is not registered, however, 0.19.1 is
at f.loadClass (http://localhost:10000/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/446.fdf8b1b233cb8c1783f6.js?v=fdf8b1b233cb8c1783f6:1:75041)
at f.loadModelClass (http://localhost:10000/static/lab/4416.74698273b3de2ad84746.js?v=74698273b3de2ad84746:1:11349)
at f._make_model (http://localhost:10000/static/lab/4416.74698273b3de2ad84746.js?v=74698273b3de2ad84746:1:9237)
at f.new_model (http://localhost:10000/static/lab/4416.74698273b3de2ad84746.js?v=74698273b3de2ad84746:1:6734)
at f.handle_comm_open (http://localhost:10000/static/lab/4416.74698273b3de2ad84746.js?v=74698273b3de2ad84746:1:5425)
at _handleCommOpen (http://localhost:10000/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/446.fdf8b1b233cb8c1783f6.js?v=fdf8b1b233cb8c1783f6:1:73457)
at C._handleCommOpen (http://localhost:10000/static/lab/jlab_core.1c88bfbd428297518bc8.js?v=1c88bfbd428297518bc8:1:1335202)
at async C._handleMessage (http://localhost:10000/static/lab/jlab_core.1c88bfbd428297518bc8.js?v=1c88bfbd428297518bc8:1:1337192)
Which is funny, as it complains that ^0.18 is not registered, but admits that v0.19.1 is.
But 0.19.1 is ^0.18
I checked and, in fact, there are no 0.18 versions for jupyter_leaflet
in conda-forge
mamba repoquery search jupyter_leaflet
returns
Executing the query jupyter_leaflet
conda-forge/linux-64 Using cache
conda-forge/noarch Using cache
Name Version Build Channel Subdir
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
jupyter_leaflet 0.19.1 pyhd8ed1ab_0 (+ 1 builds) conda-forge noarch
jupyter_leaflet 0.19.0 pyhd8ed1ab_0 (+ 1 builds) conda-forge noarch
I tried to downgrade to v0.19.0
but the error persists for the other environment I had installed (gee
).
However, now it works fine for the base
environment (regardless the downgrade).
I tried to redo everything I did for the base
environment for the new gee
environment, but it still doesn't work for gee.
from geemap.
I think I found something.
I tried to install geemap
on the base environment and it downgraded ipyleaflet
- ipyleaflet 0.19.1 pyhd8ed1ab_0 conda-forge Cached
+ ipyleaflet 0.18.2 pyhd8ed1ab_0 conda-forge Cached
Now the problem also occurs for the base environment.
If I now upgrade ipyleaflet
mamba install ipyleaflet==0.19.1
returns
Looking for: ['ipyleaflet==0.19.1']
conda-forge/linux-64 Using cache
conda-forge/noarch Using cache
Pinned packages:
- python 3.10.*
Transaction
Prefix: /home/iury/miniforge3
Updating specs:
- ipyleaflet==0.19.1
- ca-certificates
- certifi
- openssl
Package Version Build Channel Size
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Upgrade:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- ipyleaflet 0.18.2 pyhd8ed1ab_0 conda-forge Cached
+ ipyleaflet 0.19.1 pyhd8ed1ab_0 conda-forge Cached
Downgrade:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- geemap 0.32.1 pyhd8ed1ab_0 conda-forge Cached
+ geemap 0.32.0 pyhd8ed1ab_1 conda-forge 2MB
Summary:
Upgrade: 1 packages
Downgrade: 1 packages
Total download: 2MB
Which downgrades geemap to 0.32.0. and now it came back working for the base environment.
It turns out that I just needed to install ipyleaflet==0.19.1
and downgrade geemap
to 0.32.0.
ipyleaflet
is working for all environments that I do this.
Is this something we should investigate why?
Why newer version of geemap
needs an older version of ipyleaflet
?
from geemap.
Related Issues (20)
- Error applying color palette to an image using the layer manager HOT 1
- Timelapse images and GIFs are all black HOT 3
- Issues getting netcdf_to_ee() to work HOT 1
- ZonalStatsAsGroup values are slightly off HOT 2
- Add and/or edit drawn geometry properties HOT 1
- Add UI tests with Galata
- Issues related to the add_raster function HOT 4
- Features in feature collection might have different properties names HOT 1
- Datapane no longer actively maintained HOT 3
- Calling Map() in notebook after calling ee.Initialize fails due to "Secret EE_PROJECT_ID does not exist" HOT 3
- Add lock to gui when viewing layers HOT 2
- after entering m = gee map.Map() HOT 3
- Activation Code Error HOT 2
- SecretNotFoundError when initializing geemap.Map() despite proper ee initialization HOT 3
- Unable to implement ee_to_geopandas HOT 1
- Issues related to the ml.rf_to_strings() function HOT 4
- Layer names in layer control cut off on solara-based geemap app HOT 3
- Add support for EE Genie
- Help needed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geemap.