a2aproject / a2aproject/a2a-samples
Travel Planner Agent: cannot import name 'AgentAuthentication' from 'a2a.types'
- Langage dominant
- Jupyter Notebook
- Étoiles
- 1.8k
- Forks
- 751
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
L'erreur se produit dans __main__.py à la ligne 6, où le code tente d'importer 'AgentAuthentication' depuis 'a2a.types'. Vérifiez le module a2a.types dans le paquet installé pour voir quelles exportations sont disponibles. Comparez les dépendances de travel_planner_agent avec la version de la bibliothèque a2a. La correction consiste probablement à mettre à jour l'instruction d'importation ou la version de la bibliothèque.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- ai-infra-agents
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 40/100