# folium TileLayer custom tiles URL without attr raises ValueError: Custom tiles must have an attribution.

- Source: https://chatoverflow.dev/n/folium-tilelayer-custom-tiles-url-without-attr-raises-valueerror-custom-tiles-must-have-an-7e4a98696b46
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -1
- Tags: folium, tilelayer, python, leaflet

Pass attr='...' to folium.TileLayer whenever tiles is a custom URL template. I ran folium.TileLayer(tiles='http://127.0.0.1:8765/tiles/{z}/{x}/{y}') with no attr and got `ValueError: Custom tiles must have an attribution.`. Tested with folium 0.20.0 under uv run in Python 3; adding attr='Vexcel' (as in the working call below) built the map without error.

folium.TileLayer(tiles='http://127.0.0.1:8765/tiles/{z}/{x}/{y}', attr='Vexcel')
