Skip to content
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

datasette serve when invoked with --reload interprets the serve command as a file #2123

Open
cadeef opened this issue Jul 27, 2023 · 2 comments · May be fixed by #2155
Open

datasette serve when invoked with --reload interprets the serve command as a file #2123

cadeef opened this issue Jul 27, 2023 · 2 comments · May be fixed by #2155

Comments

@cadeef
Copy link

cadeef commented Jul 27, 2023

When running datasette serve with the --reload flag, the serve command is picked up as a file argument:

$ datasette serve --reload test_db
Starting monitor for PID 13574.
Error: Invalid value for '[FILES]...': Path 'serve' does not exist.
Press ENTER or change a file to reload.

If a 'serve' file is created it launches properly (albeit with an empty database called serve):

$ touch serve; datasette serve --reload test_db
Starting monitor for PID 13628.
INFO:     Started server process [13628]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)

Version (running from HEAD on main):

$ datasette --version
datasette, version 1.0a2

This issue appears to have existed for awhile as #1380 (comment) mentions the error in a different context.

I'm happy to debug and land a patch if it's welcome.

@simonw simonw added the bug label Aug 23, 2023
@simonw
Copy link
Owner

simonw commented Aug 23, 2023

I'm happy to debug and land a patch if it's welcome.

Yes please! What an odd bug.

@cadeef cadeef linked a pull request Aug 24, 2023 that will close this issue
@hueyy
Copy link

hueyy commented Sep 18, 2023

Can confirm that this bug can be reproduced as follows:

docker run datasetteproject/datasette datasette serve --reload 

which produces the following output:

Starting monitor for PID 10.
Error: Invalid value for '[FILES]...': Path 'serve' does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants