-
Notifications
You must be signed in to change notification settings - Fork 159
Description
What happened?
Project execute /cooragent/src/service/app.py, Call the interface: http://localhost:8001/v1/workflow, throw exception:
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 270, in call
await wrap(partial(self.listen_for_disconnect, receive))
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 266, in wrap
await func()
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 234, in listen_for_disconnect
message = await receive()
^^^^^^^^^^^^^^^
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 531, in receive
await self.message_event.wait()
File "/Users/wangguangyu/.local/share/uv/python/cpython-3.12.9-macos-x86_64-none/lib/python3.12/asyncio/locks.py", line 212, in wait
await fut
asyncio.exceptions.CancelledError: Cancelled by cancel scope 117b6af00
During handling of the above exception, another exception occurred:
- Exception Group Traceback (most recent call last):
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_utils.py", line 76, in collapse_excgroups
| yield
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 263, in call
| async with anyio.create_task_group() as task_group:
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 767, in aexit
| raise BaseExceptionGroup(
| ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
| result = await app( # type: ignore[func-returns-value]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
| return await self.app(scope, receive, send)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in call
| await super().call(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/applications.py", line 112, in call
| await self.middleware_stack(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 187, in call
| raise exc
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in call
| await self.app(scope, receive, _send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 85, in call
| await self.app(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in call
| await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| raise exc
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
| await app(scope, receive, sender)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 714, in call
| await self.middleware_stack(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 734, in app
| await route.handle(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 288, in handle
| await self.app(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
| await wrap_app_handling_exceptions(app, request)(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| raise exc
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
| await app(scope, receive, sender)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 74, in app
| await response(scope, receive, send)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 262, in call
| with collapse_excgroups():
| ^^^^^^^^^^^^^^^^^^^^
| File "/Users/wangguangyu/.local/share/uv/python/cpython-3.12.9-macos-x86_64-none/lib/python3.12/contextlib.py", line 158, in exit
| self.gen.throw(value)
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
| raise exc
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 266, in wrap
| await func()
| File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 248, in stream_response
| chunk = chunk.encode(self.charset)
| ^^^^^^^^^^^^
| AttributeError: 'dict' object has no attribute 'encode'
+------------------------------------
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/applications.py", line 112, in call
await self.middleware_stack(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 187, in call
raise exc
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in call
await self.app(scope, receive, _send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 85, in call
await self.app(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 714, in call
await self.middleware_stack(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 734, in app
await route.handle(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/routing.py", line 74, in app
await response(scope, receive, send)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 262, in call
with collapse_excgroups():
^^^^^^^^^^^^^^^^^^^^
File "/Users/wangguangyu/.local/share/uv/python/cpython-3.12.9-macos-x86_64-none/lib/python3.12/contextlib.py", line 158, in exit
self.gen.throw(value)
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
raise exc
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 266, in wrap
await func()
File "/Users/wangguangyu/GitHub/cooragent/.venv/lib/python3.12/site-packages/starlette/responses.py", line 248, in stream_response
chunk = chunk.encode(self.charset)
^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'encode'
Distribution version
macOS x64 (Intel)
App Version
No response
What browsers are you seeing the problem on if you're using web version?
No response
Are you self-hosting?
- Yes
Self-hosting Version
No response
Relevant log output
Anything else?
No response