-
Notifications
You must be signed in to change notification settings - Fork 371
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
Natural Earth downloads timing out #1298
Comments
I am unable to download using cartopy add land and coastline and 1000m bathymetry lineax.add_feature(cfeature.LAND, facecolor='grey', zorder=1) DownloadWarning: Downloading: http://naciscdn.org/naturalearth/10m/physical/ne_10m_bathymetry_J_1000.zip |
Please open a new issue rather than commenting on this closed one. Also, be sure to include the full error message/traceback (it's not included above). |
It's not a Cartopy issue, but Natural Earth nvkelso/natural-earth-vector#370, so opening a new issue is not necessary. |
The http://naciscdn.org/ is proving to be not very resilient as a service recently... it's also caused What do you guys think? Otherwise, I really do think that this is going to happen again, and again... which is a royal pain for the community. |
The other alternative is to make the Just floating some ideas... 🤔 |
Looks like another issue is looking into it with more recent updates: nvkelso/natural-earth-vector#372 Another thought is to write a thin wrapper that downloads all of the contents of the zip files from the main GitHub repo (they aren't zipped up there which would have enabled the mirror approach easily). Creating a conda package with the basic data in addition to a more robust mirror would also potentially be useful. See #1325 for interest in getting the data on a cluster without internet access. |
@greglucas That jogged a memory--that package already exists:
Edit: I see @bjlittle said that now. |
Hi dopplershift, thanks for the suggestion. Unfortunately, even after installing the Should they still have "ne_" prefixes? Presume so since that's how Thanks for any tips... |
@aurelgriesser I can say that all of my downloaded files have the "ne_" prefix. Can you share the output of |
I am reproducing this issue too now, but sadly only within Github Actions and not locally :(
And I still get:
I'm trying to figure this mystery out too! |
I wonder if the Cartopy config locations need to be updated when using that package. python -c "import cartopy; print(cartopy.config)" and see if they are in the correct location on the test runners... My local install is not pointing to my virtual environment, but rather my $HOME location... |
Thanks @greglucas, I am debugging with that idea now. I should clarify, that I am reproducing this within an apache/mod_wsgi github actions workflow. Doing things from Additionally, I have submitted a PR to conda-forge/cartopy-feedstock#116 to patch the cartopy available there to make folks CI's green again :) |
Ah, so the immediate difference is the setting of From the command line, I am doing the full For apache, I am being lazy and just setting $PATH, etc into the conda installation, so it does not have |
Hi everyone! I use Google Colab for my classes and I'm having this same timout problem with cartopy. It worked fine until some weeks ago... (I noticed that it was unstable but it worked sometimes. Now it just doesn't work anymore). Now I'm trying to solve the problem manually downloading the files before using the cartopy commands, without success. This is what I'm doing in Google Colab: 1-) Install cartopy via pip
2-) Check where the data dir is:
This is the output:
3-) Manually download all the shapefiles and put then in the data_dir:
But when I try to run the coastlines or border commands, the script keep trying to donwload the data from the failing server. Do you have any hints? How can I make this work when using Colab? Thanks, |
Hi @diegormsouza, I just got a simple Google Colab notebook to work with
|
Uow! Hi @rcomer, thanks for the hint! Could add the coastlines and all other features following this procedure! Huge thanks!
|
Another option is to replace line 313 in NE_URL_TEMPLATE = ('https://naciscdn.org/naturalearth/{resolution}'
'/{category}/ne_{resolution}_{name}.zip') to _NE_URL_TEMPLATE = ('https://naturalearth.s3.amazonaws.com/{resolution}_{category}/ne_{resolution}_{name}.zip') |
@ucyo that was done for Cartopy v0.20, which was released two days after @diegormsouza found his solution. The current advice would therefore be to upgrade to the latest Cartopy version. |
@diegormsouza Hi! Ⅰ tried your way but Ⅰ still get " --2021-10-30 14:38:14-- https://raw.githubusercontent.com/SciTools/cartopy/master/tools/cartopy_feature_download.py Do you have any idea how to deal with this problem? Thanks in advance. |
@LanaaaG Hi! I just tried the following on Colab and it worked well!
Are you trying exactly this? |
@diegormsouza Hi! Ⅰ retried your code in Jupyter (with campus network) and it worked! Thank you! Ⅰ guess the problem is something wrong with the previous network firewall. |
When trying to plot using Cartopy on a new installation, any Natural Earth download is timing out. In addition, if I try to download a copy of a zip file from the Natural Earth website, it times out as well. Is there an issue with the host? Here is the traceback from Python:
/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/io/init.py:264: DownloadWarning: Downloading: http://naciscdn.org/naturalearth/110m/physical/ne_110m_coastline.zip
warnings.warn('Downloading: {}'.format(url), DownloadWarning)
Traceback (most recent call last):
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 197, in __draw_idle_agg
FigureCanvasAgg.draw(self)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 464, in draw
self.figure.draw(self.renderer)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/figure.py", line 1144, in draw
renderer, self, dsu, self.suppressComposite)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images
a.draw(renderer)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/mpl/geoaxes.py", line 360, in draw
inframe=inframe)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2426, in draw
mimage._draw_list_compositing_images(renderer, self, dsu)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images
a.draw(renderer)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/mpl/feature_artist.py", line 134, in draw
geoms = self._feature.intersecting_geometries(extent)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/feature.py", line 116, in intersecting_geometries
return (geom for geom in self.geometries() if
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/feature.py", line 183, in geometries
name=self.name)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/io/shapereader.py", line 264, in natural_earth
return ne_downloader.path(format_dict)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/io/init.py", line 226, in path
result_path = self.acquire_resource(target_path, format_dict)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/io/shapereader.py", line 319, in acquire_resource
shapefile_online = self._urlopen(url)
File "/home/leec/.conda/envs/pylee/lib/python2.7/site-packages/cartopy/io/init.py", line 265, in _urlopen
return urlopen(url)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 654, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 1241, in https_open
context=self._context)
File "/home/leec/.conda/envs/pylee/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 110] Connection timed out>
The text was updated successfully, but these errors were encountered: