a2aproject / a2aproject/a2a-samples
Travel Planner Agent: cannot import name 'AgentAuthentication' from 'a2a.types'
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 1.8k
- Forks
- 751
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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
Beitragsleitfaden
Rechercherichtung
Der Fehler tritt in __main__.py in Zeile 6 auf, wo versucht wird, 'AgentAuthentication' aus 'a2a.types' zu importieren. Prüfe das a2a.types-Modul im installierten Paket, um zu sehen, welche Exporte verfügbar sind. Vergleiche die Abhängigkeiten von travel_planner_agent mit der Version der a2a-Bibliothek. Die Behebung besteht wahrscheinlich darin, die Import-Anweisung oder die Bibliotheksversion zu aktualisieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- ai-infra-agents
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 40/100