{"html_url": "https://github.com/simonw/datasette/issues/674#issuecomment-586623462", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/674", "id": 586623462, "node_id": "MDEyOklzc3VlQ29tbWVudDU4NjYyMzQ2Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-02-15T17:36:53Z", "updated_at": "2020-03-26T17:19:23Z", "author_association": "OWNER", "body": "... actually we don't need to do that, we have a mechanism for that already:\r\n\r\nhttps://github.com/simonw/datasette/blob/f1442a8151f66ceef6517b6d3d045e2ec1d0f0ec/tests/build_small_spatialite_db.py", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 565552217, "label": "Rethink how sanity checks work"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/394#issuecomment-604166918", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/394", "id": 604166918, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDE2NjkxOA==", "user": {"value": 127565, "label": "wragge"}, "created_at": "2020-03-26T00:56:30Z", "updated_at": "2020-03-26T00:56:30Z", "author_association": "CONTRIBUTOR", "body": "Thanks! I'm trying to launch Datasette from *within* a notebook using the jupyter-server-proxy and the new `base_url` parameter. While the assets load ok, and the breadcrumb navigation works, the facet links don't seem to use the `base_url`. Or have I missed something?\r\n\r\nMy test repository is here: https://github.com/wragge/datasette-test", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 396212021, "label": "base_url configuration setting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604193362", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604193362, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDE5MzM2Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T02:32:57Z", "updated_at": "2020-03-26T02:32:57Z", "author_association": "OWNER", "body": "Weird... the unit test I just added passes. So suggested facets look like they're OK.\r\n\r\nAnd yet the demo in https://mybinder.org/v2/gh/wragge/datasette-test/master?urlpath=lab doesn't work.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604194598", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604194598, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDE5NDU5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T02:37:46Z", "updated_at": "2020-03-26T02:37:46Z", "author_association": "OWNER", "body": "Here's the truncatted HTML for https://hub.gke.mybinder.org/user/wragge-datasette-test-czqms2oy/proxy/8001/results/articles\r\n```html\r\n\r\n\r\n\r\n results: articles: 400 rows\r\n \r\n \r\n \r\n/head>\r\n\r\n\r\n\r\n\r\n
\r\n\r\n

articles

\r\n\r\n

400 rows

\r\n\r\n\r\n
\r\n ... \r\n \r\n
\r\n\r\n

View and edit SQL

\r\n\r\n

This data as json, CSV (advanced)

\r\n

\r\n Suggested facets: newspaper_id, newspaper_title, page, category, illustrated, corrections, date (date)\r\n

\r\n \r\n \r\n \r\n \r\n \r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604194872", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604194872, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDE5NDg3Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T02:38:48Z", "updated_at": "2020-03-26T04:04:04Z", "author_association": "OWNER", "body": "I have a hunch about this: maybe the URLs that work are the ones that use `{{ base_url }}` directly in the template, while the ones that break are the ones that reconstruct the URL based on the incoming path?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604195244", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604195244, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDE5NTI0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T02:40:23Z", "updated_at": "2020-03-26T04:17:57Z", "author_association": "OWNER", "body": "Here's the output of the `/-/asgi-scope` plugin:\r\n```\r\n{'client': ('10.12.3.15', 0),\r\n 'headers': [(b'cookie',\r\n b''),\r\n (b'upgrade-insecure-requests', b'1'),\r\n (b'dnt', b'1'),\r\n (b'accept-encoding', b'gzip'),\r\n (b'accept-language', b'en-US,en;q=0.5'),\r\n (b'accept',\r\n b'text/html,application/xhtml+xml,application/xml;q=0.9,image/'\r\n b'webp,*/*;q=0.8'),\r\n (b'user-agent',\r\n b'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:74.0) Gecko'\r\n b'/20100101 Firefox/74.0'),\r\n (b'x-scheme', b'https'),\r\n (b'x-original-uri',\r\n b'/user/wragge-datasette-test-czqms2oy/proxy/8001/-/asgi-scope'),\r\n (b'x-forwarded-proto', b'https,http'),\r\n (b'x-forwarded-port', b'443,80'),\r\n (b'x-forwarded-host', b'hub.gke.mybinder.org'),\r\n (b'x-forwarded-for', b'148.64.98.14,10.12.3.15'),\r\n (b'x-real-ip', b'148.64.98.14'),\r\n (b'connection', b'close'),\r\n (b'host', b'hub.gke.mybinder.org'),\r\n (b'x-forwarded-context',\r\n b'/user/wragge-datasette-test-czqms2oy/proxy/8001'),\r\n (b'x-proxycontextpath',\r\n b'/user/wragge-datasette-test-czqms2oy/proxy/8001')],\r\n 'http_version': '1.1',\r\n 'method': 'GET',\r\n 'path': '/-/asgi-scope',\r\n 'query_string': b'',\r\n 'raw_path': b'/-/asgi-scope',\r\n 'root_path': '',\r\n 'scheme': 'https,http',\r\n 'server': ('127.0.0.1', 8001),\r\n 'type': 'http'}\r\n```\r\nFrom this output... it looks like the `path` being passed through to Datasette is still `/-/asgi-scope` here when I though it would be `/user/wragge-datasette-test-czqms2oy/proxy/8001/-/asgi-scope`\r\n\r\nThe original URL path (the one I want) is passed in the `x-original-uri` HTTP header.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604195577", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604195577, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDE5NTU3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T02:41:40Z", "updated_at": "2020-03-26T02:41:40Z", "author_association": "OWNER", "body": "Aha! It turns out my demo at https://github.com/simonw/jupyterserverproxy-datasette-demo suffers from the same bug.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604196158", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604196158, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDE5NjE1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T02:43:47Z", "updated_at": "2020-03-26T04:20:15Z", "author_association": "OWNER", "body": "I think the solution here may be to let the incoming `x-original-uri` header over-ride the `raw_path` used by Datasette. This may require a new Datasette setting - maybe this:\r\n\r\n --config path_from_header:x-original-uri", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604218449", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604218449, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDIxODQ0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T04:12:59Z", "updated_at": "2020-03-26T04:15:18Z", "author_association": "OWNER", "body": "I'm running this latest release like so:\r\n\r\nLaunch this binder: https://mybinder.org/v2/gh/wragge/datasette-test/master?urlpath=lab\r\n\r\nOpen the notebook.\r\n\r\nIn the notebook run this:\r\n\r\n !pip install datasette-debug-asgi https://github.com/simonw/datasette/archive/7b205af0b53c92d17b69f8c95d70a24a0c06ebce.zip\r\n\r\nAnd use this block to run Datasette:\r\n\r\n```\r\n# Get current running servers\r\nservers = list_running_servers()\r\n\r\n# Get the current base url\r\nbase_url = next(servers)['base_url']\r\n\r\n# Create a base url for Datasette suing the proxy path\r\nproxy_url = f'{base_url}proxy/8001/'\r\n\r\n# Display a link to Datasette\r\ndisplay(HTML(f'

View Datasette (Click on the stop button to close the Datasette server)

'))\r\n\r\n# Launch Datasette\r\n!datasette -- results.db --port 8001 --config base_url:$proxy_url --config path_from_header:x-original-uri --config template_debug:1\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604219753", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604219753, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDIxOTc1Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T04:18:13Z", "updated_at": "2020-03-26T04:18:13Z", "author_association": "OWNER", "body": "Woohoo that worked!\r\n\"results__articles__400_rows\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604225034", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604225034, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDIyNTAzNA==", "user": {"value": 127565, "label": "wragge"}, "created_at": "2020-03-26T04:40:08Z", "updated_at": "2020-03-26T04:40:08Z", "author_association": "CONTRIBUTOR", "body": "Great! Yes, can confirm that this works on Binder. However, when I try to run the same code locally, I get an Internal Server Error when I try to access Datasette.\r\n\r\n```\r\nERROR: Exception in ASGI application\r\nTraceback (most recent call last):\r\n File \"/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py\", line 385, in run_asgi\r\n result = await app(self.scope, self.receive, self.send)\r\n File \"/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py\", line 45, in __call__\r\n return await self.app(scope, receive, send)\r\n File \"/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/datasette_debug_asgi.py\", line 24, in wrapped_app\r\n await app(scope, recieve, send)\r\n File \"/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/datasette/utils/asgi.py\", line 174, in __call__\r\n await self.app(scope, receive, send)\r\n File \"/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/datasette/tracer.py\", line 75, in __call__\r\n await self.app(scope, receive, send)\r\n File \"/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/datasette/app.py\", line 746, in __call__\r\n raw_path = dict(scope[\"headers\"])[path_from_header.encode(\"utf8\")].split(b\"?\")[0]\r\nKeyError: b'x-original-uri'\r\nINFO: 127.0.0.1:49320 - \"GET / HTTP/1.1\" 500 Internal Server Error\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604249402", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604249402, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDI0OTQwMg==", "user": {"value": 127565, "label": "wragge"}, "created_at": "2020-03-26T06:11:44Z", "updated_at": "2020-03-26T06:11:44Z", "author_association": "CONTRIBUTOR", "body": "Following on from @betatim's suggestion on Twitter, I've changed the proxy url to include 'absolute'.\r\n\r\n``` python\r\nproxy_url = f'{base_url}proxy/absolute/8001/'\r\n```\r\nThis works both on Binder and locally, without using the `path_from_header` option. I've updated the demo repository. Sorry @simonw if I've led you down the wrong path!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/573#issuecomment-604328163", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/573", "id": 604328163, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDMyODE2Mw==", "user": {"value": 82988, "label": "psychemedia"}, "created_at": "2020-03-26T09:41:30Z", "updated_at": "2020-03-26T09:41:30Z", "author_association": "CONTRIBUTOR", "body": "Fixed by @simonw; example here: https://github.com/simonw/jupyterserverproxy-datasette-demo", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 492153532, "label": "Exposing Datasette via Jupyter-server-proxy"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604466523", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604466523, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDQ2NjUyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T14:35:43Z", "updated_at": "2020-03-26T14:35:43Z", "author_association": "OWNER", "body": "Hooray! This is a really great fix, thanks.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/712#issuecomment-604486651", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/712", "id": 604486651, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDQ4NjY1MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T15:11:49Z", "updated_at": "2020-03-26T15:11:49Z", "author_association": "OWNER", "body": "And for https://github.com/simonw/jupyterserverproxy-datasette-demo setting `\"absolute_url\": True` appears to fix the bug as well (it previously caused an infinite redirect loop but that seems not to happen any more with the latest `base_url` setting): https://github.com/simonw/jupyterserverproxy-datasette-demo/commit/880f9d50566357160b793557f145c99e74ad759a", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 588108428, "label": "base_url doesn't entirely work for running Datasette inside Binder"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/672#issuecomment-604561639", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/672", "id": 604561639, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDU2MTYzOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T17:22:07Z", "updated_at": "2020-03-26T17:22:07Z", "author_association": "OWNER", "body": "Here's the new utility function I should be using to verify database files that I find: \r\n\r\nhttps://github.com/simonw/datasette/blob/6aa516d82dea9885cb4db8d56ec2ccfd4cd9b840/datasette/utils/__init__.py#L773-L787", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 565064079, "label": "--dirs option for scanning directories for SQLite databases"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/672#issuecomment-604569063", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/672", "id": 604569063, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDU2OTA2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T17:32:06Z", "updated_at": "2020-03-26T17:32:06Z", "author_association": "OWNER", "body": "While running it against a nested directory with a TON of databases I kept seeing errors like this:\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/utils/asgi.py\", line 121, in route_path\r\n return await view(new_scope, receive, send)\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/utils/asgi.py\", line 193, in view\r\n request, **scope[\"url_route\"][\"kwargs\"]\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/views/index.py\", line 58, in get\r\n tables[table][\"num_relationships_for_sorting\"] = count\r\nKeyError: 'primary-candidates-2018/rep_candidates'\r\n```\r\nAnd\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/utils/asgi.py\", line 121, in route_path\r\n return await view(new_scope, receive, send)\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/utils/asgi.py\", line 193, in view\r\n request, **scope[\"url_route\"][\"kwargs\"]\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/views/index.py\", line 58, in get\r\n tables[table][\"num_relationships_for_sorting\"] = count\r\nKeyError: 'space_used'\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 565064079, "label": "--dirs option for scanning directories for SQLite databases"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/672#issuecomment-604665229", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/672", "id": 604665229, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDY2NTIyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T20:22:48Z", "updated_at": "2020-03-26T20:22:48Z", "author_association": "OWNER", "body": "I also eventually get this error:\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/utils/asgi.py\", line 121, in route_path\r\n return await view(new_scope, receive, send)\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/utils/asgi.py\", line 336, in inner_static\r\n await asgi_send_file(send, full_path, chunk_size=chunk_size)\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/utils/asgi.py\", line 303, in asgi_send_file\r\n async with aiofiles.open(str(filepath), mode=\"rb\") as fp:\r\n File \"/Users/simonw/.local/share/virtualenvs/datasette-oJRYYJuA/lib/python3.7/site-packages/aiofiles/base.py\", line 78, in __aenter__\r\n File \"/Users/simonw/.local/share/virtualenvs/datasette-oJRYYJuA/lib/python3.7/site-packages/aiofiles/threadpool/__init__.py\", line 35, in _open\r\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py\", line 57, in run\r\nOSError: [Errno 24] Too many open files: '/Users/simonw/Dropbox/Development/datasette/datasette/static/app.css'\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 565064079, "label": "--dirs option for scanning directories for SQLite databases"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/672#issuecomment-604667029", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/672", "id": 604667029, "node_id": "MDEyOklzc3VlQ29tbWVudDYwNDY2NzAyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-26T20:26:46Z", "updated_at": "2020-03-26T20:26:46Z", "author_association": "OWNER", "body": "I think I can tell what the current file limit is like so:\r\n```\r\nIn [1]: import resource \r\n\r\nIn [2]: resource.getrlimit(resource.RLIMIT_NOFILE) \r\nOut[2]: (256, 9223372036854775807)\r\n```\r\nSo maybe I should have Datasette refuse to open more database files than that number minus 5 (to give me some spare room for opening CSS files etc).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 565064079, "label": "--dirs option for scanning directories for SQLite databases"}, "performed_via_github_app": null}
\r\n Link\r\n \r\n rowid \u25bc\r\n