nautechsystems/nautilus_trader · error · KeyError

Chart ' ' not found. Available charts: . Register custom…

Error message

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

What it means

Thrown when the proxy entry's `storage_value` fails `B256::from_str`, i.e. it is not a valid 32-byte hex string. This value is expected to encode the implementation address in the slot's low 20 bytes and is validated both for format and semantic correctness downstream.

Solutions

  1. Set `storage_value` to the full 32-byte hex word read from the proxy's implementation slot, i.e. 0x + 64 hex chars with the 20-byte address left-padded with zeros.
  2. Fetch the live value with eth_getStorageAt(proxy, slot) and paste it verbatim as hex.
  3. Verify storage_value's low 20 bytes match the intended target_address.

Example fix

// before (manifest.json)
"storage_value": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
// after (manifest.json)
"storage_value": "0x000000000000000000000000bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
Defensive patterns

Strategy: validation

Validate before calling

let v = B256::from_str(&proxy.storage_value)?; // also check low-20-bytes == target address before submitting

Type guard

fn parse_storage_value(s: &str) -> Option<B256> { use alloy_primitives::B256; B256::from_str(s).ok() }

Try / catch

let value = B256::from_str(&proxy.storage_value).map_err(|_| anyhow!("invalid storage_value, expected 0x + 64 hex chars"))?;

Prevention

When it happens

Trigger: Manifest validation (verification.rs:1294) parses a proxy whose `storage_value` is malformed — wrong length, non-hex characters, empty string, or a decimal/JSON number instead of a hex string.

Common situations: Hand-writing the stored implementation address without left-padding to 32 bytes; copying the value without the 0x prefix and with invalid characters; mixing up storage_value with storage_slot; tooling that wrote the raw address (40 hex chars) with a format the parser rejects mid-way.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


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

Appendix: source

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

    -------
    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 18893faf8b)