Replies: 1 comment 1 reply
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: This is a known issue with Hello! This is a known issue related to how The ADK framework includes logic to handle this cancellation error to prevent crashes, but the underlying issue within the libraries used by MCP can still surface on these Python versions. [1] Workaround: [1] https://github.com/google/adk-python/blob/main/src/google/adk/runners.py |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My agent is using mcptoolset, and my test looks like this
@pytest.mark.asyncio
async def test_with_simple_trajectory():
"""Test the agent's basic ability via a session file."""
await AgentEvaluator.evaluate(
agent_module="repo_navigator",
eval_dataset_file_path_or_dir="tests/integration/test_files/simple_trajectory/simple_tractory_test.json",
print_detailed_results=True,
)
it fails with _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fut = <Task cancelled name='Task-35' coro=<ClientSession.list_tools() done, defined at C:\learning\Repo-Navigator-AI.venv\Lib\site-packages\mcp\client\session.py:473>>
loop =
async def _cancel_and_wait(fut, loop):
"""Cancel the fut future or task and wait until it completes."""
E asyncio.exceptions.CancelledError: Cancelled via cancel scope 28719010b10 by <Task pending name='Task-22' coro=<McpToolset.close() running at C:\learning\Repo-Navigator-AI.venv\Lib\site-packages\google\adk\tools\mcp_tool\mcp_toolset.py:217> cb=[_release_waiter(<Future pendi...ask_wakeup()]>)() at C:\Users\vanda\AppData\Local\Programs\Python\Python311\Lib\asyncio\tasks.py:431]>
C:\Users\vanda\AppData\Local\Programs\Python\Python311\Lib\asyncio\tasks.py:562: CancelledError, is this a known issue? is there a work around?
Beta Was this translation helpful? Give feedback.
All reactions