Skip to content
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

Update Natural Earth URL #1833

Merged
merged 2 commits into from
Sep 1, 2021
Merged

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Sep 1, 2021

This is my first Cartopy PR, so apologies if I've missed something!

Rationale

Updated the URL for Natural Earth feature downloads, following the AWS template provided by @acarapetis at #1325 (comment). @greglucas stated at #1325 (comment) that he thinks AWS is the official replacement for the https://naciscdn.org/ source (which has been rather intermittent in recent weeks).

Implications

Hopefully the shapefile downloads will become a bit more reliable.

@rcomer
Copy link
Member Author

rcomer commented Sep 1, 2021

Tested locally by running one of the gallery examples, and got a warning that suggested the files were indeed coming from the new location.

@dopplershift
Copy link
Contributor

Looks good to me!

@dopplershift dopplershift merged commit af814c3 into SciTools:master Sep 1, 2021
@rcomer
Copy link
Member Author

rcomer commented Sep 1, 2021

Thanks @dopplershift!

@emrodalmeida
Copy link

I've updated cartopy to 0.19.0 and it worked locally, but it is still trying to download the shapefiles from the old url when I execute the scripit within a Jupyter notebook with Binder. Please, am I missing something?

@dopplershift
Copy link
Contributor

Did you download the updated copy of the script from this repo?

@emrodalmeida
Copy link

No, I haven't because the installation of version 0.19.0 through conda-forge had worked locally. For the remote execution I specified this version in the environment.yml file in my github repo. This exceeds my Python knowledge, thus could you please explain how this script should be used when remotely running cartopy in a jupyter notebook?

@ktyle
Copy link

ktyle commented Sep 8, 2021

I just tested and downloading is working great from AWS using the updated shapereader.py script.

@dopplershift
Copy link
Contributor

Honestly, it sounds like the best solution is to get the Binder to regenerate the Docker image it's using with the latest cartopy from conda-forge, which has been patched to use the updated URL. You may also be able to trigger this inside a notebook with !conda update -c conda-forge cartopy.

@jdldeauna
Copy link

Hi! I've been trying to use the regionmask package and running into a similar problem with the Natural Earth URL. I tried installing cartopy with !conda update -c conda-forge --yes cartopy but this gives me v=0.18.0. I tried doing: !conda install -c conda-forge --yes cartopy=0.19.0, but it's been approx ~1hr and it still hasn't installed which is unusually long. I'm doing the installation on a Cloud server but I'm not sure that makes a difference since it installed just fine when I didn't specify a version number. Would appreciate any tips, thanks!

@rcomer
Copy link
Member Author

rcomer commented Sep 9, 2021

@jdldeauna I have no expertise on this, but there was a suggestion at #1846 (comment) to try

conda install -c conda-forge cartopy=0.19.0.post1

@emrodalmeida
Copy link

Folks, here is something that worked for me:

At first I was explicitly requesting the dependence of version 0.19.0 in my environment.yml, just I've done in my local environment, which was working fine. This version was installed in the image created by the docker as expected, but the script was still trying to download from the old url. However, when the command !conda install -c conda-forge -y cartopy=0.19.0 was executed from a cell code it actually installed the version 0.19.0.post1, which is downloading the shapefiles from the new url and is working correctly. Thus, I just modified the environment.yml dependence to request version 0.19.0.post1 and got the problem solved.

I can't say if it was an issue with the conda-forge channel for cartopy or if it was some bug with the docker image, but I think that this version discrepance between those from the explicit dependence and the installation through conda may be the cause of malfunction related by the other users as well.

Thank you all for your support!

@jdldeauna
Copy link

Thanks for the helpful tips!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants