a2aproject / a2aproject/a2a-samples

An exception occurred when running demo/ui.

Đang mở
#9 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
1.8k
Fork
751
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

After running uv run main.py in the command line, the following message appeared:

`(A2A) PS E:\Files\AI\A2A\demo\ui> uv run main.py
warning: `VIRTUAL_ENV=E:\Files\AI\A2A\.venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
INFO: Started server process [35056]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:12000 (Press CTRL+C to quit)`

However, when I accessed http://127.0.0.1:12000/ in the browser, the following error occurred:

`(A2A) PS E:\Files\AI\A2A\demo\ui> uv run main.py
warning: `VIRTUAL_ENV=E:\Files\AI\A2A\.venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
INFO: Started server process [35056]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:12000 (Press CTRL+C to quit)
INFO: 127.0.0.1:13400 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:13400 - "GET /styles.css HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:13402 - "GET /zone.js/bundles/zone.umd.js HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:13403 - "GET /prod_bundle.js HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:13402 - "POST /__ui__ HTTP/1.1" 200 OK
INFO: 127.0.0.1:13402 - "GET /__web-components-module__/components/async_poller.js HTTP/1.1" 304 Not Modified
INFO: 127.0.0.1:13402 - "POST /__ui__ HTTP/1.1" 200 OK
Failed to list conversations: Server disconnected without sending a response.
Failed to list tasks Server disconnected without sending a response.
Failed to update state: 'NoneType' object is not iterable
Traceback (most recent call last):
File "E:\Files\AI\A2A\demo\ui\state\host_agent_service.py", line 154, in UpdateAppState
for task in await GetTasks():
^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
INFO: 127.0.0.1:13402 - "POST /__ui__ HTTP/1.1" 200 OK
Failed to list conversations:
Failed to list tasks Server disconnected without sending a response.
Failed to update state: 'NoneType' object is not iterable
Traceback (most recent call last):
File "E:\Files\AI\A2A\demo\ui\state\host_agent_service.py", line 154, in UpdateAppState
for task in await GetTasks():
^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
INFO: 127.0.0.1:13402 - "POST /__ui__ HTTP/1.1" 200 OK
Failed to list conversations: Server disconnected without sending a response.
Failed to list tasks Server disconnected without sending a response.
Failed to update state: 'NoneType' object is not iterable`

**How should I resolve this issue, and what troubleshooting approach should I take?**

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The error originates in `demo/ui/state/host_agent_service.py` at line 154 where `GetTasks()` returns `None`. First, examine the `GetTasks` function to understand its expected return type and why it might return `None`. Check the server connectivity and the state of the underlying agent service. Run the demo and reproduce the error, then trace the data flow from the UI request to the task listing endpoint.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
fastapi, python
Lĩnh vực
api, backend, devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.