Folium Maps broken in HTML - OSM Tile Server Blocked
Contents
Somewhat recently OSM enforced changes to their tile access policy. This is fair enough, this is a free service provided to the benefit of everyone, yet hosting tiles is not free. However, for tools which aren’t compliant, this results in tiles being completely blocked, making interactive maps significantly less useful:

This example happens when you use nbconvert to export a jupyter notebook to HTML when it contains a folium map - in this case produced with geopandas.
I recently discovered the issue when reviewing a validation pipeline where the historical outputs from last year
worked fine at the time, but reviewing them nowadays they no longer work. Until folium is able to resolve
some version of this issue the simple solution is
to use something like python -m http.server to serve the html and use that to view it. This works, but
is not super convenient - relative paths, and it doesn’t just open automatically.
Instead, I’ve got a simple script, to slightly improve the ergonomics:
| |
I suppose I could package this into something you could invoke directly with uv, but I’d rather hope and upstream
solution is available sooner than later!
Author Matt Richards
LastMod September 19, 2026 (83c6310)