<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-ligatures:none;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-ligatures:standardcontextual;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Silenced now. But if the GDALOpenEx docs say<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Verbose error: GDAL_OF_VERBOSE_ERROR. If set, a failed attempt to open the file will lead to an error message to be reported.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When it is not set (the case here) it should not need this “extra care”, no?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none">From:</span></b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none"> Even Rouault <even.rouault@spatialys.com>
<br>
<b>Sent:</b> Sunday, June 29, 2025 8:24 PM<br>
<b>To:</b> Joaquim Manuel Freire Luís <jluis@ualg.pt>; gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> Re: [gdal-dev] GDALOpenEx() not failing silently<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hi,<span style="font-size:12.0pt;mso-ligatures:none"><o:p></o:p></span></p>
<p>you can surround the call to GDALOpenEx() with<o:p></o:p></p>
<p>CPLPushErrorHandler(CPLQuietErrorHandler);<o:p></o:p></p>
<p>... GDALOpenEx() here ...<o:p></o:p></p>
<p>CPLPopErrorHandler();<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 29/06/2025 à 21:20, Joaquim Manuel Freire Luís via gdal-dev a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="PT"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT">Hi,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT"> </span><o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">The closes (to C and perhaps Python) I can reproduce is this<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">julia> GMT.Gdal.GDALOpenEx("/vsigzip//vsicurl/<a href="https://bulk.meteostat.net/v2/daily/08554.csv.gz">https://bulk.meteostat.net/v2/daily/08554.csv.gz</a>", GMT.Gdal.GDAL_OF_RASTER, C_NULL, C_NULL, C_NULL)<o:p></o:p></p>
<p class="MsoNormal">ERROR 1: At line 1, did not find X, Y and/or Z values<o:p></o:p></p>
<p class="MsoNormal"><span lang="PT">Ptr{Nothing} @0x0000000000000000</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT"> </span><o:p></o:p></p>
<p class="MsoNormal">All works right, but this error message is annoying (and normal users will not understand it).<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Anything I can do to shut it up?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Joaquim <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-ligatures:none"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>gdal-dev mailing list<o:p></o:p></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</body>
</html>