a2aproject / a2aproject/a2a-samples
Travel Planner Agent: cannot import name 'AgentAuthentication' from 'a2a.types'
- 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ả
### What happened?
Following the instructions for [travel_planner_agent](https://github.com/google-a2a/a2a-samples/blob/main/samples/python/agents/travel_planner_agent/README.md), step 3 (`uv run .`) fails with the following error:
> ImportError: cannot import name 'AgentAuthentication' from 'a2a.types'
### Relevant log output
```shell
Using CPython 3.13.3
Creating virtual environment at: .venv
Built travel-planner @ file:///path/to/a2a-samples/samples/python/agents/travel_planner_agent
Installed 65 packages in 261ms
/path/to/a2a-samples/samples/python/agents/travel_planner_agent/.venv/lib/python3.13/site-packages/google/protobuf/runtime_version.py:98: UserWarning: Protobuf gencode version 5.29.3 is exactly one major version older than the runtime version 6.31.1 at a2a.proto. Please update the gencode to avoid compatibility violations in the next runtime release.
warnings.warn(
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/path/to/a2a-samples/samples/python/agents/travel_planner_agent/__main__.py", line 6, in
from a2a.types import (
...<4 lines>...
)
ImportError: cannot import name 'AgentAuthentication' from 'a2a.types' (/path/to/a2a-samples/samples/python/agents/travel_planner_agent/.venv/lib/python3.13/site-packages/a2a/types.py)
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Hướng dẫn đóng góp
Hướng nghiên cứu
Lỗi xảy ra trong __main__.py tại dòng 6, nơi mã cố gắng import 'AgentAuthentication' từ 'a2a.types'. Kiểm tra module a2a.types trong package đã cài đặt để xem những export nào khả dụng. So sánh các dependency của travel_planner_agent với phiên bản của thư viện a2a. Bản sửa có thể sẽ liên quan đến việc cập nhật câu lệnh import hoặc phiên bản thư viện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- ai-infra-agents
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 40/100