[gdal-dev] gdal.VectorTranslate bug on Linux

Lorenzo Di Giacomo loridigia at gmail.com
Thu Oct 6 07:23:55 PDT 2022


Hello, i noticed a strange behaviour in the gdal.VectorTranslate function.
This is my snippet:














*from osgeo import gdal, ogrimport sys'''- SRC (FILE)- DST (FILE)- FORMAT
(GEOJSON)'''SRC =
"/tmp/9f097a2e-d849-4261-9735-f3d45a6d01e7/example.kml"DST =
"/tmp/test.json"FORMAT = "GeoJson"srcDS = gdal.OpenEx(SRC)print("read
done")ds = gdal.VectorTranslate(DST, srcDS, format=FORMAT)*

This code works fine on OSX 10.14 with
GDAL 3.2.0, released 2020/10/26 but not on Debian 11 with GDAL 3.4.2,
released 2022/03/08 and it gave as error: *ERROR 1: hSrcDS == NULL*

Do you know what it could be?
I also tried the snipped described here:
https://github.com/OSGeo/gdal/issues/1683
But even with the Options passed in that manner, gave the same error.
Thanks for your help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221006/35c3f16b/attachment.htm>


More information about the gdal-dev mailing list