[QGIS-Developer] no such function: InitSpatialMetadata
Giovanna De Filippis
g.defilippis at santannapisa.it
Tue Dec 31 03:41:35 PST 2019
Hi! I am porting a QGIS plugin to QGIS3.
I get a problem when I try to create a new SpatiaLite DB, in particular when
I initialize spatial metadata (GEOMETRY_COLUMNS and SPATIAL_REF_SYS).
My code is:
import sqlite3
con = sqlite3.connect(dbname)
con.enable_load_extension(True)
cur = con.cursor()
cur.execute("PRAGMA foreign_keys = ON")
cur.execute("SELECT InitSpatialMetaData(1);")
Here I get the error "no such function: InitSpatialMetadata"
My sqlite3 version is 3.29.0
Any idea about that?
Thank you for your support!
Giovanna
Giovanna De Filippis, Ph.D.
Institute of Life Sciences - Scuola Superiore Sant'Anna
Via Santa Cecilia 3, 56127 Pisa (Italy)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20191231/f66fc2d0/attachment.html>
More information about the QGIS-Developer
mailing list