Jump to content

Language: Python3

Using Module: folium

 

The code I run:

import folium
map = folium.Map(location=[38.58, -99.09], zoom_start=6, tiles="Mapbox Bright")
map.save("Map1.html")

 

I saved it as map1.py and ran it with Visual Studio Code

 

the error i get:

Traceback (most recent call last):
  File "d:/development/Python/Video Couse Python Mega/35-web-app/map1.py", line 2, in <module>
    map = folium.Map(location=[38.58, -99.09], zoom_start=6, tiles="Mapbox Bright")
  File "C:\Users\hirusha\AppData\Local\Programs\Python\Python38\lib\site-packages\folium\folium.py", line 288, in __init__
    tile_layer = TileLayer(tiles=tiles, attr=attr,
  File "C:\Users\hirusha\AppData\Local\Programs\Python\Python38\lib\site-packages\folium\raster_layers.py", line 95, in __init__
    raise ValueError(
ValueError: Built-in templates for Mapbox and Cloudmade have been removed. You can still use these providers by passing a URL to the `tiles` argument. See the documentation of the `TileLayer` class.

 

What can i go? does it have to do something with my code? why isn't this working?

hey! i know to use a computer

Link to comment
https://linustechtips.com/topic/1329479-python3-folium-error/
Share on other sites

Link to post
Share on other sites

47 minutes ago, hirusha.adikari said:

What can i go? does it have to do something with my code? why isn't this working?

There's a skill you need to learn: you need to learn to read the error-messages you get.

 

As the error-message there says: "ValueError: Built-in templates for Mapbox and Cloudmade have been removed. You can still use these providers by passing a URL to the `tiles` argument. See the documentation of the `TileLayer` class." -- something has changed in Folium and you should go read this Folium's documentation to see what and how you need to change your code.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
https://linustechtips.com/topic/1329479-python3-folium-error/#findComment-14668439
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×