[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

load extention spatialite in sqlite on windows

On Thu, Jul 11, 2019 at 8:57 AM MICHAEL LANE via Python-list
<python-list at python.org> wrote:
>     conn.load_extension('c:\\mydll\\mod_spatialite')
> sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) OsError 0xc1 (193)
> (Background on this error at: http://sqlalche.me/e/e3q8)

Seems this is SQLite's way of throwing up its arms and saying "I have
no idea what went wrong". The error code 0xC1 or 193 decimal can be
interpreted from Microsoft's documentation:


193 (0xC1)

%1 is not a valid Win32 application.

I would guess that this is referring to the DLL itself (it might not
be, but that's a good place to start), and the first thing I'd do is
check if it's even a Windows DLL file - maybe something broke in the
download or something. If it looks like a legit file, the next thing
I'd look at is whether it's a 32-bit or 64-bit DLL; you have to match
the word size of your SQLite binary.

Unfortunately SQLite didn't give much info, so we're a bit in the dark
here. This may require some research.