nautechsystems/nautilus_trader · error
`Venue` not found for `publisher_id` {publisher_id}
Error message
`Venue` not found for `publisher_id` {publisher_id} What it means
After decoding the record's publisher ID, decode_nautilus_instrument_id looks the publisher up in the loader's publisher_venue_map to find the Nautilus Venue. If no Venue mapping is registered for that publisher ID, mapping the record to a Nautilus instrument is impossible and this error is thrown. It is a configuration gap, not a data corruption issue.
Source
Thrown at crates/adapters/databento/src/symbology.rs:84
/// # Errors
///
/// Returns an error if:
/// - The publisher cannot be extracted from the record.
/// - The publisher ID is not found in the venue map.
/// - The underlying instrument ID mapping fails.
pub fn decode_nautilus_instrument_id(
record: &dbn::RecordRef,
metadata: &mut MetadataCache,
publisher_venue_map: &IndexMap<PublisherId, Venue>,
symbol_venue_map: &AHashMap<Symbol, Venue>,
) -> anyhow::Result<InstrumentId> {
let publisher = record
.publisher()
.map_err(|e| anyhow::anyhow!("Invalid `publisher` for record: {e}"))?;
let publisher_id = publisher as PublisherId;
let venue = publisher_venue_map
.get(&publisher_id)
.ok_or_else(|| anyhow::anyhow!("`Venue` not found for `publisher_id` {publisher_id}"))?;
let mut instrument_id = get_nautilus_instrument_id_for_record(record, metadata, *venue)?;
if publisher == Publisher::GlbxMdp3Glbx
&& let Some(venue) = symbol_venue_map.get(&instrument_id.symbol)
{
instrument_id.venue = *venue;
}
Ok(instrument_id)
}
/// Gets the Nautilus `InstrumentId` for a Databento record.
///
/// # Errors
///
/// Returns an error if:
/// - The record type is not supported.
/// - Timestamp overflow occurs when calculating the date.View on GitHub (pinned to 18893faf8b)
Solutions
- Add the missing PublisherId → Venue entry to the publisher_venue_map when configuring the loader (or use the adapter's default/builder that covers all supported publishers).
- Upgrade the nautilus databento adapter so the built-in publisher map includes the new publisher.
- Confirm the dataset/publisher of the file you are reading is actually supported, and use the matching dataset when requesting data.
Example fix
// before
let mut loader = DatabentoDataLoader::new();
// after
let mut loader = DatabentoDataLoader::new();
loader.set_publisher_venue_map(my_map_with_publisher(1234, Venue::from("XCME"))); Defensive patterns
Strategy: validation
Validate before calling
// Rust
let publisher_id = record.publisher()? as PublisherId;
anyhow::ensure!(
publisher_venue_map.contains_key(&publisher_id),
"no Venue mapping for publisher {publisher_id}; register it before decoding"
); Try / catch
let venue = publisher_venue_map.get(&publisher_id).copied();
if venue.is_none() {
log::warn!("unknown publisher {publisher_id}; record skipped");
return Ok(None);
} Prevention
- Use the adapter's default publisher→Venue map and extend it for new datasets
- After adapter upgrades, re-check that all datasets you use are in the map
- Fail fast at startup: verify every dataset you plan to load has a venue mapping
When it happens
Trigger: Decoding records from a publisher ID (dataset) that is not in the loader's publisher_venue_map — e.g. data from a dataset whose Databento venue mapping was never registered because `with_publisher_venue_map` / the default map predates that publisher, or a custom map omitted an entry.
Common situations: Using a custom publisher→Venue map that omits newer Databento datasets (e.g. new equities/options datasets); data files from datasets other than the configured ones; adapter version too old to include the mapping for a newly released publisher.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- No venue found for `publisher_id` {publisher_id}
- Invalid `publisher` for record: {e}
- Invalid venue {}, expected Blockchain DEX format
- Invalid `{SCHEMA_PARAM}` '{schema}'. Must be one of: {allowe
- Invalid negative `contract_multiplier`: {value}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/950a5cac9e395337.
Report an issue: GitHub.