Description of the problem
Hi everyone,
I just rerun a previously working pygmt code and now I cannot plot OpenStreetMap anymore with tilemap. The tiles are now showing an access blocked form OpenStreetMap (see added figure). I checked it with both PyGMT version 0.17.0 and the newest version 0.19.0. Also I tried to rerun the tile maps example (https://www.pygmt.org/v0.19.0/gallery/maps/tilemaps.html). And I still get the same message as for my own code. If I use alternatively a Cartopy script to plot OpenStreetMap it works, so it seems to be an PyGMT issue.
Based on the linked webpage, PyGMT encounters a General Block: https://wiki.openstreetmap.org/wiki/Blocked_tiles
I would be happy if you could check if this is also happening for you. Thank you!
Greetings
Sarah
.
Minimal Complete Verifiable Example
"""
Tile maps
=========
The :meth:`pygmt.Figure.tilemap` method allows to plot
tiles from a tile server or local file as a basemap or overlay.
"""
# %%
import contextily
import pygmt
from pygmt.params import Axis
fig = pygmt.Figure()
fig.tilemap(
region=[-157.84, -157.8, 21.255, 21.285],
projection="M12c",
# Set level of details (0-22)
# Higher levels mean a zoom level closer to the Earth's
# surface with more tiles covering a smaller
# geographic area and thus more details and vice versa
# Please note, not all zoom levels are always available
zoom=14,
# Use tiles from OpenStreetMap tile server
source="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
frame=Axis(annot=True, tick=True, grid=True),
)
fig.show()
Full error message
Access blocked 403
App is not following the tile usage policy of OpenStreetMap's volunteer-run servers: osm.wiki/Blocked
System information
PyGMT information:
version: v0.19.0
System information:
python: 3.14.6 | packaged by conda-forge | (main, Jul 24 2026, 16:09:24) [GCC 14.3.0]
executable: ~/.conda/envs/pygmt/bin/python
machine: Linux-6.12.0-160000.36-default-x86_64-with-glibc2.40
Dependency information:
numpy: 2.5.2
pandas: 3.0.5
xarray: 2026.7.0
packaging: 26.3
contextily: 1.7.1
geopandas: None
IPython: None
pyarrow: None
rioxarray: 0.23.0
gdal: 3.13.2
ghostscript: 10.07.1
GMT library information:
version: 6.7.0
padding: 2
share dir: ~/.conda/envs/pygmt/share/gmt
plugin dir: ~/.conda/envs/pygmt/lib/gmt/plugins
library path: ~/.conda/envs/pygmt/lib/libgmt.so
cores: 16
grid layout: rows
image layout:
Or:
PyGMT information:
version: v0.17.0
System information:
python: 3.13.9 | packaged by conda-forge | (main, Oct 16 2025, 10:31:39) [GCC 14.3.0]
executable: ~/conda/envs/seispy_env/bin/python
machine: Linux-6.12.0-160000.36-default-x86_64-with-glibc2.40
Dependency information:
numpy: 2.3.5
pandas: 2.2.3
xarray: 2025.11.0
packaging: 25.0
contextily: 1.7.0
geopandas: 1.1.1
IPython: 9.7.0
pyarrow: 21.0.0
rioxarray: 0.20.0
gdal: 3.10.2
ghostscript: 10.06.0
GMT library information:
version: 6.5.0
padding: 2
share dir: ~/conda/envs/seispy_env/share/gmt
plugin dir: ~/conda/envs/seispy_env/lib/gmt/plugins
library path: ~/conda/envs/seispy_env/lib/libgmt.so
cores: 16
grid layout: rows
image layout:
binary version: 6.5.0
Description of the problem
Hi everyone,
I just rerun a previously working pygmt code and now I cannot plot OpenStreetMap anymore with tilemap. The tiles are now showing an access blocked form OpenStreetMap (see added figure). I checked it with both PyGMT version 0.17.0 and the newest version 0.19.0. Also I tried to rerun the tile maps example (https://www.pygmt.org/v0.19.0/gallery/maps/tilemaps.html). And I still get the same message as for my own code. If I use alternatively a Cartopy script to plot OpenStreetMap it works, so it seems to be an PyGMT issue.
Based on the linked webpage, PyGMT encounters a General Block: https://wiki.openstreetmap.org/wiki/Blocked_tiles
I would be happy if you could check if this is also happening for you. Thank you!
Greetings
Sarah
.
Minimal Complete Verifiable Example
Full error message
System information