4

I have been successfully using the mod_spatialite extension for sqlite in Linux for a while now, but a client wants an application that relies on mod_spatialite to work in Windows.

I have extracted the required dlls to a folder that I have added to the Windows PATH variable. This lets me start a standalone version of sqlite3.exe and load mod_spatialite with SELECT load_extension('mod_spatialite');. However, when trying to load this extension in Python using the sqlite3 module, I get an error:

sqlite3.OperationalError: The specified procedure could not be found

In linux, I can simply use SELECT load_extension('/path/to/mod_spatialite');, but sqlite3 gives the same 'specified procedure could not be found' error.

Am I missing something here?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Oct 15, 2015 at 16:56

1 Answer 1

4

The problem was with the version of Sqlite Python was using. The sqlite3.dll shipped with ArcGIS's Python 2.7.5 could not load the mod_spatialite extension.

So solve the issue, I simply downloaded the .dll for the newest version of sqlite3 (available here) and then replaced the sqlite3.dll found in C:\Python27\ArcGIS10.2\DLLs with the new one.

answered Oct 15, 2015 at 17:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.