We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running concurrent requests to the flask app I get this error often. It goes away if I comment this line: app.teardown_appcontext(_close_async_sessions).
app.teardown_appcontext(_close_async_sessions)
Debugging middleware caught exception in streamed response at a point where response headers were already sent. Traceback (most recent call last): File "/home/user/proj/.venv/lib/python3.12/site-packages/flask/app.py", line 1498, in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/proj/.venv/lib/python3.12/site-packages/whitenoise/base.py", line 81, in __call__ return self.application(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/proj/.venv/lib/python3.12/site-packages/werkzeug/middleware/proxy_fix.py", line 183, in __call__ return self.app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/proj/.venv/lib/python3.12/site-packages/opentelemetry/instrumentation/flask/__init__.py", line 390, in _wrapped_app result = wsgi_app(wrapped_app_environ, _start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/proj/.venv/lib/python3.12/site-packages/flask/app.py", line 1489, in wsgi_app ctx.pop(error) File "/home/user/proj/.venv/lib/python3.12/site-packages/flask/ctx.py", line 426, in pop app_ctx.pop(exc) File "/home/user/proj/.venv/lib/python3.12/site-packages/flask/ctx.py", line 262, in pop self.app.do_teardown_appcontext(exc) File "/home/user/proj/.venv/lib/python3.12/site-packages/flask/app.py", line 1344, in do_teardown_appcontext self.ensure_sync(func)(exc) RuntimeError: You cannot use AsyncToSync in the same thread as an async event loop - just await the async function directly.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When running concurrent requests to the flask app I get this error often. It goes away if I comment this line:
app.teardown_appcontext(_close_async_sessions)
.The text was updated successfully, but these errors were encountered: