We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When using xyzservices with Mapbox loading tiles fails.
To Reproduce
xyz.MapBox["accessToken"] = Config.mapbox_token tiles = xyz.MapBox m = folium.Map(location=[45.5236, -122.6750], tiles=tiles, attr= "Mapbox")
Expected behavior A clear and concise description of what you expected to happen.
Environment (please complete the following information):
KeyError Traceback (most recent call last) File ~/....venv/lib/python3.10/site-packages/xyzservices/lib.py:44, in Bunch.getattr(self, key) 43 try: ---> 44 return self.getitem(key) 45 except KeyError: KeyError: 'lower' During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last) Cell In[36], line 4 1 xyz.MapBox["accessToken"] = Config.mapbox_token 2 tiles = tiles ----> 4 m = folium.Map(location=[45.5236, -122.6750], 5 tiles=tiles, 6 attr= "Mapbox") File ~/.../.venv/lib/python3.10/site-packages/folium/folium.py:286, in Map.init(self, location, width, height, left, top, position, tiles, attr, min_zoom, max_zoom, zoom_start, min_lat, max_lat, min_lon, max_lon, max_bounds, crs, control_scale, prefer_canvas, no_touch, disable_3d, png_enabled, zoom_control, **kwargs) 283 self.objects_to_stay_in_front = [] 285 if tiles: --> 286 tile_layer = TileLayer(tiles=tiles, attr=attr, 287 min_zoom=min_zoom, max_zoom=max_zoom) 288 self.add_child(tile_layer, name=tile_layer.tile_name) File ~/.../.venv/lib/python3.10/site-packages/folium/raster_layers.py:84, in TileLayer.init(self, tiles, min_zoom, max_zoom, max_native_zoom, attr, detect_retina, name, overlay, control, show, no_wrap, subdomains, tms, opacity, **kwargs) 77 def init(self, tiles='OpenStreetMap', min_zoom=0, max_zoom=18, 78 max_native_zoom=None, attr=None, 79 detect_retina=False, name=None, overlay=False, 80 control=True, show=True, no_wrap=False, subdomains='abc', 81 tms=False, opacity=1, **kwargs): 83 self.tile_name = (name if name is not None else ---> 84 ''.join(tiles.lower().strip().split())) 85 super(TileLayer, self).init(name=self.tile_name, overlay=overlay, 86 control=control, show=show) 87 self._name = 'TileLayer' File ~/.../.venv/lib/python3.10/site-packages/xyzservices/lib.py:46, in Bunch.getattr(self, key) 44 return self.getitem(key) 45 except KeyError: ---> 46 raise AttributeError(key) AttributeError: lower
KeyError Traceback (most recent call last) File ~/....venv/lib/python3.10/site-packages/xyzservices/lib.py:44, in Bunch.getattr(self, key) 43 try: ---> 44 return self.getitem(key) 45 except KeyError:
KeyError: 'lower'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last) Cell In[36], line 4 1 xyz.MapBox["accessToken"] = Config.mapbox_token 2 tiles = tiles ----> 4 m = folium.Map(location=[45.5236, -122.6750], 5 tiles=tiles, 6 attr= "Mapbox")
File ~/.../.venv/lib/python3.10/site-packages/folium/folium.py:286, in Map.init(self, location, width, height, left, top, position, tiles, attr, min_zoom, max_zoom, zoom_start, min_lat, max_lat, min_lon, max_lon, max_bounds, crs, control_scale, prefer_canvas, no_touch, disable_3d, png_enabled, zoom_control, **kwargs) 283 self.objects_to_stay_in_front = [] 285 if tiles: --> 286 tile_layer = TileLayer(tiles=tiles, attr=attr, 287 min_zoom=min_zoom, max_zoom=max_zoom) 288 self.add_child(tile_layer, name=tile_layer.tile_name)
File ~/.../.venv/lib/python3.10/site-packages/folium/raster_layers.py:84, in TileLayer.init(self, tiles, min_zoom, max_zoom, max_native_zoom, attr, detect_retina, name, overlay, control, show, no_wrap, subdomains, tms, opacity, **kwargs) 77 def init(self, tiles='OpenStreetMap', min_zoom=0, max_zoom=18, 78 max_native_zoom=None, attr=None, 79 detect_retina=False, name=None, overlay=False, 80 control=True, show=True, no_wrap=False, subdomains='abc', 81 tms=False, opacity=1, **kwargs): 83 self.tile_name = (name if name is not None else ---> 84 ''.join(tiles.lower().strip().split())) 85 super(TileLayer, self).init(name=self.tile_name, overlay=overlay, 86 control=control, show=show) 87 self._name = 'TileLayer'
File ~/.../.venv/lib/python3.10/site-packages/xyzservices/lib.py:46, in Bunch.getattr(self, key) 44 return self.getitem(key) 45 except KeyError: ---> 46 raise AttributeError(key)
AttributeError: lower
The text was updated successfully, but these errors were encountered:
Related: #1498
Sorry, something went wrong.
Apologies, I see now this is not yet released.
No worries. It will be included in the upcoming 0.14.0 release indeed.
No branches or pull requests
Describe the bug
When using xyzservices with Mapbox loading tiles fails.
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Environment (please complete the following information):
**Error Message**
The text was updated successfully, but these errors were encountered: