nautechsystems/nautilus_trader · error · KeyError

Chart '{name}' not found.{suggestion_text} Available charts:

Error message

Chart '{name}' not found.{suggestion_text} Available charts: {available}. Register custom charts with register_chart().

What it means

BetfairExecutionClientConfig::validate() rejects request_rate_per_second == 0 for the live execution client. This field throttles general Betting API requests from the execution client (market references, cancellations by market, etc.); zero would deadlock the limiter, so validation fails fast. The exec config validate() runs the same currency parse first, then both rate checks.

Source

Thrown at python/nautilus_trader/analysis/tearsheet.py:329

    -------
    Callable
        The chart function.

    Raises
    ------
    KeyError
        If the chart name is not registered.

    """
    _require_not_none(name, "name")

    if name not in _CHART_REGISTRY:
        available = ", ".join(_CHART_REGISTRY.keys())

        suggestions = get_close_matches(name, _CHART_REGISTRY.keys(), n=3, cutoff=0.6)
        suggestion_text = f" Did you mean: {', '.join(suggestions)}?" if suggestions else ""

        raise KeyError(
            f"Chart '{name}' not found.{suggestion_text} "
            f"Available charts: {available}. "
            f"Register custom charts with register_chart().",
        )

    return _CHART_REGISTRY[name]


def list_charts() -> list[str]:
    """
    List all registered chart names.

    Returns
    -------
    list[str]
        List of available chart names.

    """

View on GitHub (pinned to a4b06ed870)

Solutions

  1. Set a positive request rate within your app key's transaction limits
  2. Omit the field to use the default
  3. Validate the exec config in CI/deployment scripts before going live

Example fix

// before
BetfairExecutionClientConfig::builder().request_rate_per_second(0)

// after
BetfairExecutionClientConfig::builder().request_rate_per_second(5)
Defensive patterns

Strategy: validation

Validate before calling

let config = BetfairExecutionClientConfig::builder()
    .request_rate_per_second(5)
    .build()?;
config.validate()?;

Type guard

fn is_positive_rate(v: u32) -> bool {
    v > 0
}

Prevention

When it happens

Trigger: Building a live execution client config with request_rate_per_second set to 0; deserializing a JSON/YAML exec config where the field is 0; calling validate() or constructing the execution client factory with that config.

Common situations: Assuming 0 disables the limiter; config templates defaulting numerics to 0; porting a paper-trading config to live with placeholder zeros left in place.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16). Data as JSON: /api/errors/69dfa9d39ae70982. Report an issue: GitHub.