Closed darrenwiens closed 8 months ago
All of this is to say, if you want a proposed fix for it, I can make a quick PR. :smiley:
So I think the easiest fix is probably just call 'install spatial' and 'load spatial' every time. Thanks for catching this, and makes sense that it wouldn't always be there.
I checked the extensions overview, and looks like you can use FROM duckdb_extensions();
to see the load status, but I've seen no downside to just calling 'install'.
Looking through the docs it does say 'If you are using the Python API client, you can install and load them with the install_extension(name: str)
and load_extension(name: str)
methods.' Maybe that's a slightly better way to do it? But if conn.execute("install spatial;load spatial;")
(or break into two conn.executes) works then that's probably fine.
Thanks for catching this, I assume it'll hit a number of people. Probably worth cutting a release when this gets in. If you can do a fix that'd be great, I gotta get to bed now.
Environment Information
Description
Just getting started with a fresh duckdb install,
get_buildings
fails because we try to load the spatial extension even if it has not been previously installed.What I Did
To Replicate
~/duckdb/extensions/...
get_buildings