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

RasterIO errors #53

Closed
zags opened this issue Aug 10, 2018 · 8 comments
Closed

RasterIO errors #53

zags opened this issue Aug 10, 2018 · 8 comments

Comments

@zags
Copy link

zags commented Aug 10, 2018

I'm getting inconsistent and unhelpful rasterio errors whenever I try to use this library. Running the following code:

landsat8.tile("LC08_L1TP_221078_20180625_20180626_01_RT", 11825, 18900, 15)

first gives me the error:

rio_tiler/utils.py in tile_read(source, bounds, tilesize, indexes, nodata)
222
223 else:
--> 224 with rasterio.open(source) as src:
225 vrt_transform, vrt_width, vrt_height = get_vrt_transform(src,
226 bounds)

CPLE_HttpResponseError: CURL error: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none

Running the same command again gives me

rio_tiler/utils.py in tile_read(source, bounds, tilesize, indexes, nodata)
222
223 else:
--> 224 with rasterio.open(source) as src:
225 vrt_transform, vrt_width, vrt_height = get_vrt_transform(src,
226 bounds)

RasterioIOError: '/vsis3/landsat-pds/c1/L8/221/078/LC08_L1TP_221078_20180625_20180626_01_RT/LC08_L1TP_221078_20180625_20180626_01_RT_B4.TIF' does not exist in the file system, and is not recognized as a supported dataset name.

I get this behavior on both Sentilel and Landsat. I get this on all versions of rio_tiler, ranging from 0.0.3 to 1.0rc1

I've already tried the solutions in #52 and rasterio/rasterio#1289; neither helps.

@vincentsarago
Copy link
Member

👋 Hi @zags, thanks for opening this issue.
can you try to do

$ export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

as explained in rasterio/rasterio#1289 and #19 ?

Please feel free to close if it solve your issue.

@zags
Copy link
Author

zags commented Aug 10, 2018

Setting the following fixes it for landsat:

os.environ["AWS_REQUEST_PAYER"] = "requester"
os.environ["CURL_CA_BUNDLE"] = "/etc/ssl/certs/ca-certificates.crt"

I'm still getting the error for sentinel.

sentinel2.tile("S2B_tile_20180803_22JER_0", 11825, 18895, 15)

RasterioIOError: '/vsis3/sentinel-s2-l1c/tiles/22/J/ER/2018/8/3/0/preview.jp2' does not exist in the file system, and is not recognized as a supported dataset name.

@vincentsarago
Copy link
Member

@zags this is an platform specific, do you have gdal installed, how did you installed rasterio ?

can you try gdalinfo /vsis3/sentinel-s2-l1c/tiles/22/J/ER/2018/8/3/0/preview.jp2 ?

@zags
Copy link
Author

zags commented Aug 10, 2018

I do have gdal installed and rasterio was installed via PIP.

gdalinfo tells me

ERROR 15: AWS_SECRET_ACCESS_KEY configuration option not defined
gdalinfo failed - unable to open '/vsis3/sentinel-s2-l1c/tiles/22/J/ER/2018/8/3/0/preview.jp2'.

I have ~/.boto and ~/.aws/config files with my keys

@vincentsarago
Copy link
Member

This is a configuration problem (not a rio-tiler issue). I'm really sorry. checkout http://boto3.readthedocs.io/en/latest/guide/configuration.html it might help.

@zags
Copy link
Author

zags commented Aug 13, 2018

The RioTiler issue is the completely undecipherable error messages. If it's an authentication problem, this should be reflected in the resulting error

@vincentsarago
Copy link
Member

I understand but that's a GDAL/Rasterio error.
Noticing that it might be updated with the work currently happening on rasterio/rasterio#1429

@zags
Copy link
Author

zags commented Aug 13, 2018

Fixing the GDAL configuration does not solve this problem. GDAL then gives:

ERROR 4: /vsis3/sentinel-s2-l1c/tiles/22/J/ER/2018/8/3/0/preview.jp2: No such file or directory

/vsis3/sentinel-s2-l1c/tiles/22/J/ER/2018/8/3/0/preview.jp2 is being generated by RIO-tiler.

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

No branches or pull requests

2 participants