Error basemap - geemap #1306
roliveiramachado
started this conversation in
General
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
When importing the geemap package (jupyter lab) I get this error.
Can you help me?
Thanks
KeyError Traceback (most recent call last)
File ~/opt/miniconda3/lib/python3.9/site-packages/geemap/basemaps.py:231
230 try:
--> 231 name = item['name']
232 basemap = 'basemaps.{}'.format(name)
KeyError: 'name'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
Cell In [3], line 1
----> 1 import geemap
File ~/opt/miniconda3/lib/python3.9/site-packages/geemap/init.py:7
4 email = 'giswqs@gmail.com'
5 version = '0.6.8'
----> 7 from .geemap import *
8 from .basemaps import ee_basemaps
9 from .legends import builtin_legends
File ~/opt/miniconda3/lib/python3.9/site-packages/geemap/geemap.py:14
12 # from colour import Color
13 from ipyleaflet import *
---> 14 from .basemaps import ee_basemaps
15 from .conversion import *
16 from .legends import builtin_legends
File ~/opt/miniconda3/lib/python3.9/site-packages/geemap/basemaps.py:239
237 basemap = 'basemaps.{}'.format(name)
238 basemap = basemap.replace('Mids', 'Modis')
--> 239 ee_basemaps[name] = basemap_to_tiles(eval(basemap))
File ~/opt/miniconda3/lib/python3.9/site-packages/ipyleaflet/leaflet.py:57, in basemap_to_tiles(basemap, day, **kwargs)
44 """Turn a basemap into a TileLayer object.
45
46 Parameters
(...)
54 Extra key-word arguments to pass to the TileLayer constructor.
55 """
56 if isinstance(basemap, xyzservices.lib.TileProvider):
---> 57 url = basemap.build_url(time=day)
58 elif isinstance(basemap, dict):
59 url = basemap.get("url", "")
File ~/opt/miniconda3/lib/python3.9/site-packages/xyzservices/lib.py:450, in TileProvider.build_url(self, x, y, z, scale_factor, fill_subdomain, **kwargs)
447 provider.update(kwargs)
449 if provider.requires_token():
--> 450 raise ValueError(
451 "Token is required for this provider, but not provided. "
452 "You can either update TileProvider or pass respective keywords "
453 "to build_url()."
454 )
456 url = provider.pop("url")
458 if scale_factor:
ValueError: Token is required for this provider, but not provided. You can either update TileProvider or pass respective keywords to build_url().
Beta Was this translation helpful? Give feedback.
All reactions