a2aproject / a2aproject/a2a-samples

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

オープン
#111 コメント 1 件 リアクション 1 件 担当者 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 を短くまとめたダイジェスト。