Try to reproduce this 
<https://geoalchemy-2.readthedocs.io/en/latest/spatialite_tutorial.html> in 
windows. How to do that?



Even though I put the dll file in a directory defined in %PATH% or try 
with/without full path, with/without file extension, with '//' or '\', with 
libspatialite-4.dll or using excute with all combination mentionned 
before...
 dbapi_conn.execute("SELECT load_extension('mod_spatialite.dll')")


For example i tried this kind of combinaison:

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)


Any hint will be appreciated.

Thanks

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To 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 [email protected].
To post to this group, send email to [email protected].
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.

Reply via email to