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

DOC: avoid downloading .tif file #2919

Merged
merged 4 commits into from
May 3, 2019
Merged

DOC: avoid downloading .tif file #2919

merged 4 commits into from
May 3, 2019

Conversation

grinsted
Copy link
Contributor

Simplify by using that rasterio can read directly from http.

This also removes imports of requests and os.

Simplify by using that rasterio can read directly from http. 

This also removes imports of requests and os.
@pep8speaks
Copy link

pep8speaks commented Apr 25, 2019

Hello @grinsted! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-04-26 09:44:24 UTC

@fmaussion
Copy link
Member

Thanks! Can you do the same for the other example as well?

@grinsted
Copy link
Contributor Author

Done.

@fmaussion
Copy link
Member

@grinsted what OS are you running this on? I'm a bit concerned about this here: https://github.com/mapbox/rasterio#ssl-certs

I came into this while trying it locally, and even after setting the env variable I still get this error:

RasterioIOError: '/vsicurl/https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif' does not exist in the file system, and is not recognized as a supported dataset name.

I wonder if I'm the only one in that case, or if other users might be affected as well

@grinsted
Copy link
Contributor Author

grinsted commented Apr 28, 2019 via email

@grinsted
Copy link
Contributor Author

I have just tested on a linux box and it works. I have access to a geo-notebook on a cloud service via my university . sys.version says:

3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38)
[GCC 7.3.0]

@fmaussion
Copy link
Member

Thanks! Yes, I've tested on a conda env and it works. So my take is that it probably won't work out-of-the box on debian/ubuntu/mint where rasterio is installed via pip.

So my question to @shoyer or @jhamman : should we change this example for the nicer code above, even if a minority of people (pip users like me) might find that this doesn't work for them?

@grinsted
Copy link
Contributor Author

I wonder why it desn't work with pip. It is a feature inherited from GDAL. I guess it has something to do with how that is compiled.

@fmaussion
Copy link
Member

I wonder why it desn't work with pip.

Because of that: https://github.com/mapbox/rasterio#ssl-certs . It will work, but not out-of-the box. I personally don't mind, but we might get a few "your example doesn't work" requests here although it has nothing to do with xarray, this is why I'm asking others devs before merging.

@dcherian
Copy link
Contributor

How about adding a comment saying that this may/may not work and suggest a workaround

@fmaussion
Copy link
Member

How about adding a comment saying that this may/may not work and suggest a workaround

Thanks for the suggestion! I've decided against it because it will be too wordy - let's see if this is really affecting that many people first.

Thanks @grinsted for the PR!

@fmaussion fmaussion changed the title Avoid downloading .tif file DOC: avoid downloading .tif file May 3, 2019
@fmaussion fmaussion merged commit 2633b1e into pydata:master May 3, 2019
dcherian added a commit to dcherian/xarray that referenced this pull request May 6, 2019
* upstream/master:
  [WIP] Custom fill value for reindex, align, and merge operations (pydata#2920)
  Attempt to fix py35 build on Travis (pydata#2925)
  List formatting in docs (pydata#2939)
  DOC: Avoid downloading .tif file (pydata#2919)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants