komoot / staticmap

A small, python-based library for creating map images with lines, markers and polygons.
https://www.komoot.com
Other
290 stars 65 forks source link

Runtime error response #19

Closed ahmetanildindar closed 5 years ago

ahmetanildindar commented 5 years ago

Hi there, I've been using staticmap for long time in my programs. Your work is very much appreciated.

This morning, I've started having the following response and failed using staticmap.

Raise RuntimeError("could not download {} tiles: {}".format(len(tiles), tiles)) RuntimeError: could not download 4 tiles: [(16, 10, 'http://a.tile.osm.org/5/16/10.png'), (16, 11, 'http://a.tile.osm.org/5/16/11.png'), (17, 10, 'http://a.tile.osm.org/5/17/10.png'), (17, 11, 'http://a.tile.osm.org/5/17/11.png')]

The screenshot for what I see is below. image

I wonder whether this is a critical issue or not?

Do you have any suggestion?

ahmetanildindar commented 5 years ago

Dear all, The issue was solved by uninstalling and then re-installing static map :)))

Static map is a really useful module I used in my studies.

Regards from Istanbul.

AAD

brauchle commented 4 years ago

FYI: had the same issue, for me the problem was that the official OSM tile server blocked requests that have no user agent header.

So for me adding headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"} fixed the issue.

kambrium commented 4 years ago

Thanks @brauchle! This is really helpful.