[QGIS-Developer] no such function: InitSpatialMetadata

Andrea Giudiceandrea andreaerdna at libero.it
Tue Dec 31 17:36:37 PST 2019


Giovanna De Filippis wrote
> cur.execute("SELECT InitSpatialMetaData(1);")
> 
> Here I get the error "no such function: InitSpatialMetadata"

Hi Giovanna,
probably you need to load SpatiaLite as an extension module
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=mod_spatialite before
the "SELECT InitSpatialMetaData(1);" statement:

con.execute("SELECT load_extension('mod_spatialite')")

Best regards.

Andrea



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html


More information about the QGIS-Developer mailing list