I have no information on that, this has to do with the sqlite3 module included 
with Python:

import sqlite3

conn = sqlite3.connect(":memory:")
conn.load_extension("c:\\path\\to\\dll")

Use cPython resources to get help and use the above code as what you're trying 
to get to work:

https://www.python.org/community/lists/





On Wed, Jul 10, 2019, at 10:39 AM, Michael Lane wrote:
> 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 sqlalchemy+unsubscr...@googlegroups.com.
>  To post to this group, send email to sqlalchemy@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
>  
> <https://groups.google.com/d/msgid/sqlalchemy/31ce59e1-ac35-45ae-b584-d50a594adc70%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  For more options, visit https://groups.google.com/d/optout.

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@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/07596df2-9be5-4a0a-9925-a15c256bcfa5%40www.fastmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to