Same file doesn't work on non-s3 host


olivier.dalang@...
 

Dear list,

I'm just starting with rasterio (through the marblecutter project), and am stumbling on a strange issue. Everything works fine when I try to load tifs from s3 (I'm testing out with openaerialmap's data). But if I serve one of their files from another source, it doesn't work, with the following error :

rasterio.errors.RasterioIOError: '/vsicurl/https://[...].tif' not recognized as a supported file format.
I looked carefully at the data and headers returned by both s3 and my server, and I don't see any significant difference, neither in the data or the headers...

Is there some s3 specific logic in rasterio that prevents this from working on a regular http server ?

Or how can I get some more info about what is failing ? I'm a bit lost about how to debug this...

Thanks !!

Olivier


Sean Gillies
 

Hi Olivier,

On Thu, Mar 5, 2020 at 10:07 AM Olivier Dalang <olivier.dalang@...> wrote:
Dear list,

I'm just starting with rasterio (through the marblecutter project), and am stumbling on a strange issue. Everything works fine when I try to load tifs from s3 (I'm testing out with openaerialmap's data). But if I serve one of their files from another source, it doesn't work, with the following error :

rasterio.errors.RasterioIOError: '/vsicurl/https://[...].tif' not recognized as a supported file format.
I looked carefully at the data and headers returned by both s3 and my server, and I don't see any significant difference, neither in the data or the headers...

Is there some s3 specific logic in rasterio that prevents this from working on a regular http server ?

Or how can I get some more info about what is failing ? I'm a bit lost about how to debug this...

Thanks !!

Olivier

The exception message doesn't give you much of a lead, it's true. To debug network issues, the places to look are your server logs and GDAL's curl client logs. You can enable the latter by running your program with CPL_CURL_VERBOSE=YES set in the environment. Summaries of the HTTP requests and responses will dumped into your terminal, as if you ran "curl -v".

--
Sean Gillies