{"record":{"id":"e23287ed59307adb","repo":"TauricResearch/TradingAgents","slug":"no-available-vendor-for-method","errorCode":null,"errorMessage":"No available vendor for '{method}'","messagePattern":"No available vendor for '(.+?)'","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tradingagents/dataflows/interface.py","lineNumber":262,"sourceCode":"            f\"any configured vendor{reason}. The symbol may be invalid, delisted, \"\n            f\"not covered, or the vendor returned stale data. Do not estimate or \"\n            f\"fabricate values — report that data is unavailable for this symbol.\"\n        )\n\n    # No vendor returned data and none reported clean \"no data\" — surface the\n    # first real error (e.g. the primary vendor's network failure). Optional\n    # enrichment categories degrade to a sentinel instead, so flavour data can't\n    # abort the run.\n    if first_error is not None:\n        if category in OPTIONAL_CATEGORIES:\n            logger.warning(\"Optional %s unavailable for %s: %s\", category, method, first_error)\n            return (\n                f\"DATA_UNAVAILABLE: optional {category} could not be retrieved \"\n                f\"({first_error}). Proceed without it; do not fabricate values.\"\n            )\n        raise first_error\n\n    raise RuntimeError(f\"No available vendor for '{method}'\")\n","sourceCodeStart":244,"sourceCodeEnd":263,"githubUrl":"https://github.com/TauricResearch/TradingAgents/blob/a33fd4c0f134485a43553a2c23a63cb14adbd88f/tradingagents/dataflows/interface.py#L244-L263","documentation":"Raised by route_to_vendor() in tradingagents/dataflows/interface.py as the terminal RuntimeError after the vendor loop ends: no vendor returned a value, none reported a clean NoMarketDataError, and no first_error was captured. In practice it means the resolved vendor chain was empty or every vendor failed in a way that recorded nothing — a defensive backstop against falling off the end without a verdict.","triggerScenarios":"VENDOR_METHODS[method] resolving to an empty mapping (registry drift in forks), or control flow reaching the end with all state unset — normal single-vendor failures are captured as first_error and re-raised instead, so end users should rarely see this exact message.","commonSituations":"Forks/plugins that register a method with an empty vendor dict; exotic exceptions bypassing the recorded handlers; highly defensive code paths after upstream refactors of the router.","solutions":["Inspect the registry: from tradingagents.dataflows.interface import VENDOR_METHODS; print(VENDOR_METHODS.get(method)) — an empty/missing dict is the cause","Reinstall a consistent package version if registry tables drifted (pip install --force-reinstall tradingagents)","If you maintain the fork, ensure every categorized method has at least one vendor entry","As a caller, catch RuntimeError around route_to_vendor as a last-resort handler mapping to 'data unavailable'"],"exampleFix":"# before\nresult = route_to_vendor(\"get_fundamentals\", \"AAPL\")  # registry entry empty\n# -> RuntimeError: No available vendor for 'get_fundamentals'\n\n# after\nfrom tradingagents.dataflows.interface import VENDOR_METHODS\nassert VENDOR_METHODS.get(\"get_fundamentals\"), \"no vendors registered\"\nresult = route_to_vendor(\"get_fundamentals\", \"AAPL\")","handlingStrategy":"try-catch","validationCode":"from tradingagents.dataflows.interface import VENDOR_METHODS\n\ndef has_any_vendor(method: str) -> bool:\n    return bool(VENDOR_METHODS.get(method))","typeGuard":null,"tryCatchPattern":"try:\n    result = route_to_vendor(method, *args)\nexcept RuntimeError as e:\n    if \"No available vendor\" in str(e):\n        logger.error(\"No vendors registered for %s; registry is inconsistent\", method)\n        return f\"DATA_UNAVAILABLE: {method} has no vendor implementation\"\n    raise","preventionTips":["Keep registry tables consistent when forking (categorize + register together)","Pin the package version and reinstall atomically on upgrade","Route all calls through one dispatch helper that pre-checks VENDOR_METHODS"],"tags":["routing","interface","registry","runtimeerror"],"backgroundTag":null,"analyzedSha":"a33fd4c0f134485a43553a2c23a63cb14adbd88f","analyzedAt":"2026-08-14T19:45:16.920Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}