-
-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Labels
Description
Lines 533 to 548 in 242bc89
| async def check_databases(ds): | |
| # Run check_connection against every connected database | |
| # to confirm they are all usable | |
| for database in list(ds.databases.values()): | |
| try: | |
| await database.execute_fn(check_connection) | |
| except SpatialiteConnectionProblem: | |
| raise click.UsageError( | |
| "It looks like you're trying to load a SpatiaLite" | |
| " database without first loading the SpatiaLite module." | |
| "\n\nRead more: https://docs.datasette.io/en/stable/spatialite.html" | |
| ) | |
| except ConnectionProblem as e: | |
| raise click.UsageError( | |
| f"Connection to {database.path} failed check: {str(e.args[0])}" | |
| ) |
This could use the find_spatialite() function and, if it finds something, suggest the user use --load-extension=spatialite
datasette/datasette/utils/__init__.py
Lines 1015 to 1019 in 242bc89
| def find_spatialite(): | |
| for path in SPATIALITE_PATHS: | |
| if os.path.exists(path): | |
| return path | |
| raise SpatialiteNotFound |
Reactions are currently unavailable