Skip to content

datasette one.db one.db opens database twice, as one and one_2 #1632

@simonw

Description

@simonw
% mkdir /tmp/data
% cp ~/Dropbox/Development/datasette/fixtures.db /tmp/data 
% datasette /tmp/data/*.db /tmp/data/created.db --create -p 8852
...
INFO:     Uvicorn running on http://127.0.0.1:8852 (Press CTRL+C to quit)
^CINFO:     Shutting down
% datasette /tmp/data/*.db /tmp/data/created.db --create -p 8852
...
INFO:     127.0.0.1:49533 - "GET / HTTP/1.1" 200 OK

The first time I ran Datasette I got two databases - fixtures and created

BUT... when I ran Datasette the second time it looked like this:

image

This is the same result you get if you run:

datasette /tmp/data/fixtures.db /tmp/data/created.db /tmp/data/created.db

This is caused by this Datasette issue:

So... either I teach Datasette to de-duplicate multiple identical file paths passed to the command, or I can't use /data/*.db in the Dockerfile here and I need to go back to other solutions for the challenge described in this comment: simonw/datasette-publish-fly#12 (comment)

Originally posted by @simonw in simonw/datasette-publish-fly#12 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions