issue_comments: 651193131
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/issues/873#issuecomment-651193131 | https://api.github.com/repos/simonw/datasette/issues/873 | 651193131 | MDEyOklzc3VlQ29tbWVudDY1MTE5MzEzMQ== | 9599 | 2020-06-29T15:27:00Z | 2020-06-29T15:27:00Z | OWNER | Aha! Yes it's not being called, and the reason is this: https://github.com/encode/starlette/issues/486 Short version: by default an exception raised during that phase is silently swallowed! You can avoid the swallowing by adding `lifespan="on"` to the call to `uvicorn.run()`. When I did that here: `uvicorn.run(ds.app(), host=host, port=port, log_level="info", lifespan="on")` The server failed to start with this error: ``` INFO: Started server process [68849] INFO: Waiting for application startup. ERROR: Exception in 'lifespan' protocol Traceback (most recent call last): File ".../uvicorn/lifespan/on.py", line 48, in main await app(scope, self.receive, self.send) File ".../uvicorn/middleware/proxy_headers.py", line 45, in __call__ return await self.app(scope, receive, send) File ".../datasette_debug_asgi.py", line 9, in wrapped_app if scope["path"] == "/-/asgi-scope": KeyError: 'path' ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 647095487 |