-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load_tile_map/tilemap: Raise an exception if tiles are not downloaded? #3154
Labels
bug
Something isn't working
Comments
Sometimes I can't build the documentation locally, because I can't access the tile servers. I'm wondering if we should catch the "requests.exceptions.ConnectionError" exception?
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://github.com/GenericMappingTools/pygmt/actions/runs/8516861579/job/23326547419?pr=3153 for an example run. Sometimes, the test
test_tilemap_ogc_wgs84
fails with long error messages and the most useful error messages are:As I understand it, when the
contextily.bounds2img
function fails to retrieve the tiles (likely due to temporary internet connection issues), it returns an empty numpy array (https://github.com/geopandas/contextily/blob/f8c34e0a25e14d9c36c15c04892754e9369ba9bb/contextily/tile.py#L665). The zero numpy array then is passed to thegrdimage
, which may cause the errors above.So, maybe in
load_tile_map
/Figure.tilemap
, whencontextily.bounds2img
returns an empty numpy array, we should raise an exception? The test still fails in this case, but at least the error messages will be much easier to understand.The text was updated successfully, but these errors were encountered: