{"url":"https://api.github.com/repos/simonw/datasette/issues/2123","repository_url":"https://api.github.com/repos/simonw/datasette","labels_url":"https://api.github.com/repos/simonw/datasette/issues/2123/labels{/name}","comments_url":"https://api.github.com/repos/simonw/datasette/issues/2123/comments","events_url":"https://api.github.com/repos/simonw/datasette/issues/2123/events","html_url":"https://github.com/simonw/datasette/issues/2123","id":1825007061,"node_id":"I_kwDOBm6k_c5sx2XV","number":2123,"title":"datasette serve when invoked with --reload interprets the serve command as a file","user":{"login":"cadeef","id":79087,"node_id":"MDQ6VXNlcjc5MDg3","avatar_url":"https://avatars.githubusercontent.com/u/79087?v=4","gravatar_id":"","url":"https://api.github.com/users/cadeef","html_url":"https://github.com/cadeef","followers_url":"https://api.github.com/users/cadeef/followers","following_url":"https://api.github.com/users/cadeef/following{/other_user}","gists_url":"https://api.github.com/users/cadeef/gists{/gist_id}","starred_url":"https://api.github.com/users/cadeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cadeef/subscriptions","organizations_url":"https://api.github.com/users/cadeef/orgs","repos_url":"https://api.github.com/users/cadeef/repos","events_url":"https://api.github.com/users/cadeef/events{/privacy}","received_events_url":"https://api.github.com/users/cadeef/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":727708732,"node_id":"MDU6TGFiZWw3Mjc3MDg3MzI=","url":"https://api.github.com/repos/simonw/datasette/labels/bug","name":"bug","color":"ee0701","default":true,"description":null},{"id":727708735,"node_id":"MDU6TGFiZWw3Mjc3MDg3MzU=","url":"https://api.github.com/repos/simonw/datasette/labels/help%20wanted","name":"help wanted","color":"33aa3f","default":true,"description":null}],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":3,"created_at":"2023-07-27T19:07:22Z","updated_at":"2026-02-26T00:34:44Z","closed_at":"2026-02-26T00:34:44Z","assignee":null,"author_association":"NONE","active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"When running `datasette serve` with the `--reload` flag, the serve command is picked up as a file argument:\r\n\r\n```\r\n$ datasette serve --reload test_db\r\nStarting monitor for PID 13574.\r\nError: Invalid value for '[FILES]...': Path 'serve' does not exist.\r\nPress ENTER or change a file to reload.\r\n```\r\n\r\nIf a 'serve' file is created it launches properly (albeit with an empty database called serve):\r\n\r\n```\r\n$ touch serve; datasette serve --reload test_db\r\nStarting monitor for PID 13628.\r\nINFO:     Started server process [13628]\r\nINFO:     Waiting for application startup.\r\nINFO:     Application startup complete.\r\nINFO:     Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)\r\n```\r\n\r\nVersion (running from HEAD on main):\r\n\r\n```\r\n$ datasette --version\r\ndatasette, version 1.0a2\r\n```\r\n\r\nThis issue appears to have existed for awhile as https://github.com/simonw/datasette/issues/1380#issuecomment-953366110 mentions the error in a different context.\r\n\r\nI'm happy to debug and land a patch if it's welcome.","closed_by":{"login":"simonw","id":9599,"node_id":"MDQ6VXNlcjk1OTk=","avatar_url":"https://avatars.githubusercontent.com/u/9599?v=4","gravatar_id":"","url":"https://api.github.com/users/simonw","html_url":"https://github.com/simonw","followers_url":"https://api.github.com/users/simonw/followers","following_url":"https://api.github.com/users/simonw/following{/other_user}","gists_url":"https://api.github.com/users/simonw/gists{/gist_id}","starred_url":"https://api.github.com/users/simonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonw/subscriptions","organizations_url":"https://api.github.com/users/simonw/orgs","repos_url":"https://api.github.com/users/simonw/repos","events_url":"https://api.github.com/users/simonw/events{/privacy}","received_events_url":"https://api.github.com/users/simonw/received_events","type":"User","user_view_type":"public","site_admin":false},"reactions":{"url":"https://api.github.com/repos/simonw/datasette/issues/2123/reactions","total_count":2,"+1":2,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/simonw/datasette/issues/2123/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null}