I haven't done a truly sanitized test of this yet (just the impacted plugins), but I noticed that after switching my package from running "datasette data.sqlite" to "datasette /folder" format, the app crashes when you try to use a plugin that takes an action on the first-loaded database, such as Upload CSVs. This is what happens when merely selecting Upload CSVs after adding the Upload DBs plugin:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/datasette/app.py", line 1254, in route_path
response = await view(request, send)
File "/usr/local/lib/python3.9/dist-packages/datasette/app.py", line 1442, in async_view_fn
response = await async_call_with_supported_arguments(
File "/usr/local/lib/python3.9/dist-packages/datasette/utils/__init__.py", line 977, in async_call_with_supported_arguments
return await fn(*call_with)
File "/usr/local/lib/python3.9/dist-packages/datasette_upload_csvs/__init__.py", line 46, in upload_csvs
db = [
IndexError: list index out of range
INFO: 127.0.0.1:46308 - "GET /-/upload-csvs HTTP/1.1" 500 Internal Server Error
The screen when this happens looks like this:
I think opening this issue against this plugin as opposed to the CSV one is the right call, because I expect the issue to occur with multiple plugins. (I have not tested it extensively, but I believe datasette-saved-queries just silently fails to create its table, for example.)
I really like the paradigm this plugin creates, which does not require an initial database file, but I suspect it introduced some issues that may need to be addressed across the plugin ecosystem.
I haven't done a truly sanitized test of this yet (just the impacted plugins), but I noticed that after switching my package from running "datasette data.sqlite" to "datasette /folder" format, the app crashes when you try to use a plugin that takes an action on the first-loaded database, such as Upload CSVs. This is what happens when merely selecting Upload CSVs after adding the Upload DBs plugin:
The screen when this happens looks like this:
I think opening this issue against this plugin as opposed to the CSV one is the right call, because I expect the issue to occur with multiple plugins. (I have not tested it extensively, but I believe datasette-saved-queries just silently fails to create its table, for example.)
I really like the paradigm this plugin creates, which does not require an initial database file, but I suspect it introduced some issues that may need to be addressed across the plugin ecosystem.