ropensci / rnaturalearth

An R package to hold and facilitate interaction with natural earth map data :earth_africa:
http://ropensci.github.io/rnaturalearth/
Other
217 stars 23 forks source link

ne_download() no longer working, curl requires referrer URL to be set #40

Closed mstrimas closed 3 years ago

mstrimas commented 3 years ago

ne_download() recently started running into a HTTP status was '500 Internal Server Error' error. This appears to be the same issue as outlined here on the Natural Earth GitHub repo: https://github.com/nvkelso/natural-earth-vector/issues/434

The fix apparently requires setting the "referrer URL", which can be done with curl as follows:

curl -e 'https://www.naturalearthdata.com/downloads/110m-cultural-vectors/' -I https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip

However, it's not clear to me how to do this with download.file() in R.

andysouth commented 3 years ago

Many thanks for the heads up and explanation. I'll look into further.

andysouth commented 3 years ago

This seems to have been fixed. Quick test of ne_download() now works for me. How about you @mstrimas ?

mstrimas commented 3 years ago

Working again for me too, thanks!