def load_spatialite(dbapi_conn, connection_record):dbapi_conn.load_extension('C:\\Scripts\\mod_spatialite.dll')# dbapi_conn.load_extension('C:\\Scripts\\libspatialite-4.dll')
# dbapi_conn.load_extension('mod_spatialite')
# dbapi_conn.load_extension('mod_spatialite.dll')
# dbapi_conn.execute("SELECT load_extension('C:\\pyramid\\risc\\api\\Scripts\\mod_spatialite.dll')")
# dbapi_conn.execute("SELECT load_extension('mod_spatialite.dll')")# dbapi_conn.execute("SELECT load_extension('mod_spatialite')")# dbapi_conn.load_extension('C:/Scripts\mod_spatialite.dll')
Can make it work, always getting:
dbapi_conn.load_extension('C:\\Scripts\\mod_spatialite.dll')sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) OsError 0xc1 (193)
(Background on this error at: http://sqlalche.me/e/e3q8)
--SQLAlchemy -The Python SQL Toolkit and Object Relational MapperTo post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.---You received this message because you are subscribed to the Google Groups "sqlalchemy" group.To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.To post to this group, send email to sqlal...@googlegroups.com.Visit this group at https://groups.google.com/group/sqlalchemy.To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/31ce59e1-ac35-45ae-b584-d50a594adc70%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.
conn = sqlite3.connect(":memory:")
conn.enable_load_extension(True)
conn.load_extension('c:\\mydll\\mod_spatialite')
To unsubscribe from this group and stop receiving emails from it, send an email to sqlal...@googlegroups.com.
I tried all combination for path with your exemple and always got the same error message:conn.load_extension('c:\\mydll\\mod_spatialite')sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) OsError 0xc1 (193)conn = sqlite3.connect(":memory:")conn.enable_load_extension(True)conn.load_extension('c:\\mydll\\mod_spatialite')If I don't add enable_load_extension, i got a "not authorized" message instead of the previous error.Sorry for my ignorance but I don't understand what you tell me to do with cPython.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.
To post to this group, send email to sqlal...@googlegroups.com.Visit this group at https://groups.google.com/group/sqlalchemy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/89626ede-54f0-4353-8669-fa8ca8e38976%40googlegroups.com.