You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is what get thrown if server is stopped without sending any request.
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8081 (Press CTRL+C to quit)
^CINFO: Shutting down
INFO: Waiting for application shutdown.
ERROR: Traceback (most recent call last):
File "/home/kas/.cache/pypoetry/virtualenvs/orchestrator-0coqT9JI-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 734, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/home/kas/.cache/pypoetry/virtualenvs/orchestrator-0coqT9JI-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 613, in __aexit__
await self._router.shutdown()
File "/home/kas/.cache/pypoetry/virtualenvs/orchestrator-0coqT9JI-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 721, in shutdown
await handler()
File "/home/kas/.cache/pypoetry/virtualenvs/orchestrator-0coqT9JI-py3.11/lib/python3.11/site-packages/fastapi_profiler/profiler.py", line 174, in get_profiler_result
f.write(renderer.render(session=self._profiler.last_session))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kas/.cache/pypoetry/virtualenvs/orchestrator-0coqT9JI-py3.11/lib/python3.11/site-packages/pyinstrument/renderers/speedscope.py", line 210, in render
frame = self.preprocess(session.root_frame())
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'root_frame'
ERROR: Application shutdown failed. Exiting.
INFO: Finished server process [1002483]
The text was updated successfully, but these errors were encountered:
app.add_middleware(
PyInstrumentProfilerMiddleware,
server_app=app, # Required to output the profile on server shutdown
profiler_output_type="speedscope",
is_print_each_request=False, # Set to True to show request profile on
# stdout on each request
open_in_browser=False, # Set to true to open your web-browser automatically
# when the server shuts down
html_file_name="speedscope.json", # Filename for output
async_mode="strict",
show_all=True,
)
This is what get thrown if server is stopped without sending any request.
The text was updated successfully, but these errors were encountered: