{"record":{"id":"5607c6ae409ba882","repo":"nautechsystems/nautilus_trader","slug":"no-venue-found-for-publisher-id-publisher-id","errorCode":null,"errorMessage":"No venue found for `publisher_id` {publisher_id}","messagePattern":"No venue found for `publisher_id` (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/databento/src/live.rs","lineNumber":1118,"sourceCode":"        return Ok(instrument_id);\n    }\n\n    let raw_symbol = symbol_map.get_for_rec(record).ok_or_else(|| {\n        anyhow::anyhow!(\n            \"Cannot resolve `raw_symbol` from `symbol_map` for instrument_id {}\",\n            header.instrument_id\n        )\n    })?;\n\n    let symbol = Symbol::from_str_unchecked(raw_symbol);\n\n    let publisher_id = header.publisher_id;\n    let venue = if let Some(venue) = symbol_venue_map.get_cloned(&symbol) {\n        venue\n    } else {\n        let venue = publisher_venue_map\n            .get(&publisher_id)\n            .ok_or_else(|| anyhow::anyhow!(\"No venue found for `publisher_id` {publisher_id}\"))?;\n        *venue\n    };\n    let instrument_id = InstrumentId::new(symbol, venue);\n\n    instrument_id_map.insert(header.instrument_id, instrument_id);\n    Ok(instrument_id)\n}\n\n/// Handles instrument definition messages and decodes them into Nautilus instruments.\n///\n/// # Errors\n///\n/// Returns an error if instrument decoding fails.\nfn handle_instrument_def_msg(\n    msg: &dbn::InstrumentDefMsg,\n    record: &dbn::RecordRef,\n    symbol_map: &PitSymbolMap,\n    publisher_venue_map: &IndexMap<PublisherId, Venue>,","sourceCodeStart":1100,"sourceCodeEnd":1136,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/databento/src/live.rs#L1100-L1136","documentation":"To build an InstrumentId the adapter needs a Venue. If the symbol's venue isn't cached in symbol_venue_map, it falls back to a publisher_id → Venue lookup; this error means the record's publisher_id has no registered venue mapping.","triggerScenarios":"A record arrives with a symbol not yet seen in symbol_venue_map, and its header.publisher_id is absent from publisher_venue_map (the map built at session startup from Databento publishers).","commonSituations":"Databento publishes a new publisher/dataset not known to the installed adapter version, using a historical/replay file from a dataset the local publisher map doesn't cover, or a corrupted publisher_id in the record.","solutions":["Update NautilusTrader/adapter to the latest version so the Databento publisher table includes the new publisher_id","If using a historical dataset, ensure the adapter version matches the era of the data (new publishers appear over time)","Seed symbol_venue_map for the affected symbols (e.g. via load_instruments with the right dataset) so the publisher lookup is bypassed","Verify the record's publisher_id is sane; a garbage value indicates corrupted data"],"exampleFix":"// before\nlet venue = publisher_venue_map\n    .get(&publisher_id)\n    .ok_or_else(|| anyhow::anyhow!(\"No venue found for `publisher_id` {publisher_id}\"))?;\n// after\nlet venue = publisher_venue_map.get(&publisher_id).copied().unwrap_or_else(|| {\n    log::warn!(\"Unknown publisher_id {publisher_id}, defaulting to GLBX\");\n    Venue::from_code(\"GLBX\").unwrap()\n});","handlingStrategy":"validation","validationCode":"// verify publisher map coverage at startup\nif publisher_venue_map.is_empty() {\n    return Err(anyhow::anyhow!(\"publisher_venue_map empty; update adapter version\"));\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"No venue found for `publisher_id`\") => {\n        log::error!(\"unknown publisher: {e}; upgrade adapter or seed symbol_venue_map\");\n    }\n    other => other?,\n}","preventionTips":["Keep NautilusTrader updated so new Databento publishers are recognized","Seed symbol_venue_map via load_instruments for the dataset in use","Match adapter version to the historical dataset era"],"tags":["databento","publisher","venue","lookup-miss"],"backgroundTag":"resource-not-found","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}