-
-
Notifications
You must be signed in to change notification settings - Fork 772
Closed
Labels
Description
6aa5886 added the --load-extension=spatialite
shortcut looking for the extension in these places:
datasette/datasette/utils/__init__.py
Lines 56 to 60 in 12877d7
# Can replace with sqlite-utils when I add that dependency | |
SPATIALITE_PATHS = ( | |
"/usr/lib/x86_64-linux-gnu/mod_spatialite.so", | |
"/usr/local/lib/mod_spatialite.dylib", | |
) |
However, in the datasetteproject/datasette docker image the file is at /usr/local/lib/mod_spatialite.so
.
This results in the example command here failing:
% docker run --rm -p 8001:8001 -v `pwd`:/mnt datasetteproject/datasette datasette -p 8001 -h 0.0.0.0 /mnt/data.db --load-extension=spatialite
Error: Could not find SpatiaLite extension
But it does work when given an explicit path:
% docker run --rm -p 8001:8001 -v `pwd`:/mnt datasetteproject/datasette datasette -p 8001 -h 0.0.0.0 /mnt/data.db --load-extension=/usr/local/lib/mod_spatialite.so
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)
...
Perhaps SPATIALITE_PATHS
should include /usr/local/lib/mod_spatialite.so
?