Hi,

you can surround the call to GDALOpenEx() with

CPLPushErrorHandler(CPLQuietErrorHandler);

... GDALOpenEx() here ...

CPLPopErrorHandler();

Le 29/06/2025 à 21:20, Joaquim Manuel Freire Luís via gdal-dev a écrit :

Hi,

Again the Julia wrapper. In it to find if a file holds a raster or a vector I first open it with GDAL_OF_RASTER and see it the return pointer is NULL. This has been working well and SILENTLY when it fail (because a OGR vector file name was passed in). But with these Meteostat .csv.gz files it fails (expected) but prints an ERROR 1 message.

The closes (to C and perhaps Python) I can reproduce is this

julia> GMT.Gdal.GDALOpenEx("/vsigzip//vsicurl/https://bulk.meteostat.net/v2/daily/08554.csv.gz";, GMT.Gdal.GDAL_OF_RASTER, C_NULL, C_NULL, C_NULL)

ERROR 1: At line 1, did not find X, Y and/or Z values

Ptr{Nothing} @0x0000000000000000

All works right, but this error message is annoying (and normal users will not understand it).

Anything I can do to shut it up?

Joaquim


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to