a2aproject / a2aproject/a2a-samples

Travel Planner Agent: cannot import name 'AgentAuthentication' from 'a2a.types'

未关闭
#111 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
1.8k
派生
751
PR 合并指标
30 天内没有已合并 PR

描述

### 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

贡献指南

打开贡献指南

调研方向

错误发生在 __main__.py 的第 6 行,该行尝试从 'a2a.types' 导入 'AgentAuthentication'。检查已安装软件包中的 a2a.types 模块,查看有哪些导出可用。将 travel_planner_agent 的依赖项与 a2a 库的版本进行比较。修复可能涉及更新导入语句或库版本。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
ai-infra-agents
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
40/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。