{"record":{"id":"61043984aac2049c","repo":"nautechsystems/nautilus_trader","slug":"invalid-external-order-claims-type-e","errorCode":null,"errorMessage":"Invalid `external_order_claims` type: {e}","messagePattern":"Invalid `external_order_claims` type: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/live/src/python/node.rs","lineNumber":1844,"sourceCode":"\nfn extract_external_order_claims_config_attr(\n    config_obj: &Bound<'_, PyAny>,\n) -> anyhow::Result<Option<Vec<InstrumentId>>> {\n    let Ok(claims) = config_obj.getattr(\"external_order_claims\") else {\n        return Ok(None);\n    };\n\n    if claims.is_none() {\n        return Ok(None);\n    }\n\n    if let Ok(claims) = claims.extract::<Vec<InstrumentId>>() {\n        return Ok(Some(claims));\n    }\n\n    let claim_strings = claims\n        .extract::<Vec<String>>()\n        .map_err(|e| anyhow::anyhow!(\"Invalid `external_order_claims` type: {e}\"))?;\n    let claims = claim_strings\n        .into_iter()\n        .map(|claim| {\n            InstrumentId::from_str(&claim).map_err(|e| {\n                anyhow::anyhow!(\"Invalid `external_order_claims` instrument ID {claim}: {e}\")\n            })\n        })\n        .collect::<anyhow::Result<Vec<_>>>()?;\n\n    Ok(Some(claims))\n}\n\n#[cfg(feature = \"examples\")]\ntype BuiltinActorRegister = for<'py> fn(&mut LiveNode, &Bound<'py, PyAny>) -> PyResult<()>;\n\n#[cfg(feature = \"examples\")]\ntype BuiltinStrategyRegister = for<'py> fn(&mut LiveNode, &Bound<'py, PyAny>) -> PyResult<()>;\n","sourceCodeStart":1826,"sourceCodeEnd":1862,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/d1527c24afdf475115785557f89a55c3e336c51f/crates/live/src/python/node.rs#L1826-L1862","documentation":"The external_order_claims Python attribute could not be extracted either as Vec<InstrumentId> or as Vec<String>: its elements are of some other type (int, dict, mixed list, None).","triggerScenarios":"Setting external_order_claims to a non-list or a list of objects that are neither InstrumentId instances nor strings, e.g. [12345] or \"BTCUSDT-PERP\" (a bare string, not a list).","commonSituations":"Passing a single instrument ID string instead of a list, or passing raw numeric venue IDs.","solutions":["Make it a list: external_order_claims = [\"BTCUSDT-PERP.BINANCE\"]","Ensure every element is a string or an InstrumentId instance, not mixed types","Do not pass None; omit the attribute to use the default"],"exampleFix":"# before\nexternal_order_claims = \"BTCUSDT-PERP.BINANCE\"\n\n# after\nexternal_order_claims = [\"BTCUSDT-PERP.BINANCE\"]","handlingStrategy":"type-guard","validationCode":"# Python\nclaims = cfg.get(\"external_order_claims\")\nassert claims is None or (isinstance(claims, list) and all(isinstance(c, (str, InstrumentId)) for c in claims))","typeGuard":"# Python\ndef valid_claims(c) -> bool:\n    return c is None or (isinstance(c, list) and all(isinstance(x, (str, InstrumentId)) for x in c))","tryCatchPattern":"try:\n    node = build_node(config)\nexcept Exception as e:\n    if \"external_order_claims\" in str(e) and \"type\" in str(e):\n        # normalize to list of strings and retry","preventionTips":["Always pass a list, never a bare string","Use fully qualified instrument ID strings","Validate config with a schema/pydantic model before node construction"],"tags":["python","config","type-conversion","instrument-id"],"backgroundTag":"config-type-mismatch","analyzedSha":"d1527c24afdf475115785557f89a55c3e336c51f","analyzedAt":"2026-08-27T04:01:12.327Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}