Run workflow failed
Bug Description
The workflow built failed When I executed the workflow on Langflow page. Following is the related logs
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1133, in __call__ await super().__call__(scope, receive, send) File "/app/.venv/lib/python3.12/site-packages/starlette/applications.py", line 113, in __call__ await self.middleware_stack(scope, receive, send) File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__ raise exc File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__ await self.app(scope, receive, _send) File "/app/.venv/lib/python3.12/site-packages/opentelemetry/instrumentation/asgi/__init__.py", line 795, in __call__ await self.app(scope, otel_receive, otel_send) File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 176, in __call__ response = await self.handler(request, exc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/langflow/main.py", line 461, in exception_handler await logger.aerror(f"unhandled error: {exc}", exc_info=exc) File "/app/.venv/lib/python3.12/site-packages/structlog/_native.py", line 159, in ameth await asyncio.get_running_loop().run_in_executor( File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/structlog/_native.py", line 161, in <lambda> lambda: ctx.run( ^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/structlog/_native.py", line 162, in <lambda> lambda: self._proxy_to_logger(name, event, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/structlog/_base.py", line 223, in _proxy_to_logger return getattr(self._logger, method_name)(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/structlog/_output.py", line 110, in msg print(message, file=f, flush=True) ValueError: I/O operation on closed file.
Reproduction
Just to execute the workflow
Expected behavior
Langflow should gracefully log the original exception without failing due to a closed file stream. The workflow execution should not terminate because the logger fails.
Who can help?
@italojohnny
Operating System
Ubuntu 22.04.5 LTS
Langflow Version
1.6.5
Python Version
3.12
Screenshot
Flow File
No response
hi,
what component is that?
hi,
what component is that?
The workflow I took a screenshot of includes 15 nodes, but the issue is that it reports an error right at startup. And it's any other workflow that reports an error, even a simple input box component.