rohitg00/ai-engineering-from-scratch · error · ValueError
probe timeouts must be positive
Error message
probe timeouts must be positive
What it means
Error "probe timeouts must be positive" thrown in rohitg00/ai-engineering-from-scratch.
Source
Thrown at phases/13-tools-and-protocols/08-building-an-mcp-client/code/main.py:303
peer_name: str
local_name: str
description: str
class MultiServerClient:
def __init__(
self,
*,
supported_modern: tuple[str, ...] = (PROTOCOL_VERSION,),
supported_legacy: tuple[str, ...] = (LEGACY_VERSION,),
probe_version: str | None = None,
discovery_timeout_ms: int = 1_000,
legacy_probe_timeout_ms: int = 1_000,
) -> None:
if not supported_modern or not supported_legacy:
raise ValueError("at least one modern and legacy version must be configured")
if discovery_timeout_ms <= 0 or legacy_probe_timeout_ms <= 0:
raise ValueError("probe timeouts must be positive")
self.supported_modern = supported_modern
self.supported_legacy = supported_legacy
self.probe_version = probe_version or supported_modern[0]
self.discovery_timeout_ms = discovery_timeout_ms
self.legacy_probe_timeout_ms = legacy_probe_timeout_ms
self.client_capabilities = CLIENT_CAPABILITIES.copy()
self.peers: dict[str, Peer] = {}
self.registry: dict[str, MergedTool] = {}
self._next_request_id = 1
def _new_id(self) -> int:
request_id = self._next_request_id
self._next_request_id += 1
return request_id
def add_server(
self,
name: str,View on GitHub (pinned to 39ea8a1c6d)
When it happens
Trigger: Thrown at phases/13-tools-and-protocols/08-building-an-mcp-client/code/main.py:303 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of rohitg00/ai-engineering-from-scratch@39ea8a1c6d (2026-08-26).
Data as JSON: /api/errors/9e927e6541894386.
Report an issue: GitHub.