[Qgis-developer] Connect to Spatialite db from Pyqgis causes OperationalError: no such functions geometry constraints

Marcelo Reyes reyesmarcelo at gmail.com
Wed Mar 31 16:13:12 EDT 2010


I'm currently developping a small stand alone app with qgis python bindings
and spatialite. So far I managed to load a vector layer from de spatialite
database, but when I try to UPDATE or INSERT anything I get the folowing

OperationalError: no such functions geometry constraints

I'm guessing this is because the libspatialite extension is not loaded, but
when I try to load it using query.exec_("SELECT
load_extension('libspatialite-1.dll')") nothing happens. I'm using QGIS
1.4.0-1 "enceladus" and python 2.5, using the PyQt4 modules included in
How can I load the extension? How can I upgrade sqlite3 so it allows to load
the extension? sqlite3.version_info returns (2,3,2) but I'm making the
conection using QtSql.

any help is greatly appreciated.


Marcelo Reyes
Edif. Alborada Of. 605
Tel. 2201034
Cel. 72501267
La Paz Bolivia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100331/953f68b5/attachment.html

More information about the Qgis-developer mailing list