-
-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--load-extension=spatialite not working with Windows #2198
Comments
The issue is still present, and the fix above still works in datasette version 1.0a3 |
Looking into coming up with a fix instead of a patch, (see above.) Which matches the input argurment to the datasette command:
but I'm on a Windows box, so let's go wtih:
That resulted in no output whatsoever. I'm going to try wrapping the path in double quotes since I'm on Windows. Nope, still no output. Let's try a Linux style path with double quotes. With a Linux style path, I get the same error. Here's part of the issue: This is done by appending ":entrypoint_name" after supplying the path to the extensionclass LoadExtension(click.ParamType): Notice the dependency on ':' in that block of code from /utils/Init.py. No fix yet. |
And here's the proposed fix. I still need to for and do a pull request and all that good stuff, but the fix in /utils/init.py should be: The following in the LoadExtension class:
To make things even spiffier, add the (somewhat standard?) landing path for the spatialite dll on Windows: ala
|
Using each of
python -m datasette counties.db -m metadata.yml --load-extension=SpatiaLite
and
python -m datasette counties.db --load-extension="C:\Windows\System32\mod_spatialite.dll"
and
python -m datasette counties.db --load-extension=C:\Windows\System32\mod_spatialite.dll
I got the error:
I finally tried modifying the code in app.py to read:
At which point the counties example worked.
Is there a correct way to install/use the extension on Windows? My method will cause issues if there's a second extension to be used.
On an unrelated note, my next step is to figure out how to write a query across the two loaded databases supplied from the command line:
python -m datasette rm_toucans_23_10_07.db counties.db -m metadata.yml --load-extension=SpatiaLite
The text was updated successfully, but these errors were encountered: