Hi Nyall, > It's a rubbish error message. Blame sip. It should be saying: > > "arguments did not match any overloaded call: > missing 1 required positional argument: 'fileEncoding'"
ahhhhh ok, get it now, thanks! > > Because, as the dox show, fileEncoding is a required argument. And > indeed, this works fine for me: > > error = > QgsVectorFileWriter.writeAsVectorFormat(layer=iface.activeLayer(),fileEncoding='UTF-8',fileName='/home/nyall/Temporary/test.geojson',driverName='GeoJSON') however is it possible that the exported geojson file does not have the Z value even if the source file has it? It happens also by exporting the layer with the UI and forcing the geometry type and checking the "Include Z dimension". Cheers Matteo _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer