{"record":{"id":"2529ededd5d7df22","repo":"nautechsystems/nautilus_trader","slug":"publishers-filepath-is-required","errorCode":null,"errorMessage":"Publishers filepath is required","messagePattern":"Publishers filepath is required","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"crates/adapters/databento/src/factories.rs","lineNumber":229,"sourceCode":"    /// Sets whether to timestamp bars on close.\n    #[must_use]\n    pub const fn bars_timestamp_on_close(mut self, timestamp_on_close: bool) -> Self {\n        self.bars_timestamp_on_close = timestamp_on_close;\n        self\n    }\n\n    /// Builds the [`DatabentoDataClientConfig`].\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if required fields are missing.\n    pub fn build(self) -> anyhow::Result<DatabentoDataClientConfig> {\n        let api_key = self\n            .api_key\n            .ok_or_else(|| anyhow::anyhow!(\"API key is required\"))?;\n        let publishers_filepath = self\n            .publishers_filepath\n            .ok_or_else(|| anyhow::anyhow!(\"Publishers filepath is required\"))?;\n\n        Ok(DatabentoDataClientConfig::new(\n            api_key.into_inner(),\n            publishers_filepath,\n            self.use_exchange_as_venue,\n            self.bars_timestamp_on_close,\n        ))\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use nautilus_core::time::get_atomic_clock_realtime;\n    use rstest::rstest;\n\n    use super::*;\n\n    #[rstest]","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/databento/src/factories.rs#L211-L247","documentation":"DatabentoDataClientConfigBuilder::build requires the path to a publishers.json file, which maps venue/dataset/feed combinations to gateways. If publishers_filepath was not set on the builder, build() fails with this error.","triggerScenarios":"Calling build() on DatabentoDataClientConfigBuilder without calling .publishers_filepath(...) — e.g. no publishers.json downloaded, or the config file omitted the path.","commonSituations":"Fresh setup where publishers.json was never fetched from Databento; config file missing the publishers_filepath key; running in a container without the file copied in; path removed during config refactor.","solutions":["Download publishers.json from Databento and pass its path via .publishers_filepath(...)","Set the path explicitly in your config file so it reaches the builder","Verify the configured path exists and is readable at runtime before build()","Ensure container/image packaging includes publishers.json"],"exampleFix":"// before\nlet config = DatabentoDataClientConfig::builder().api_key(key).build()?;\n// after\nlet config = DatabentoDataClientConfig::builder()\n    .api_key(key)\n    .publishers_filepath(\"/etc/databento/publishers.json\")\n    .build()?;","handlingStrategy":"validation","validationCode":"// Rust\nif !Path::new(&path).is_file() { bail!(\"publishers.json missing\"); }","typeGuard":null,"tryCatchPattern":"// Rust\nErr(e) => error!(\"config: {e:#}\"),","preventionTips":["Download publishers.json","Package in images","Validate path exists","Single config source"],"tags":["rust","databento","config","publishers"],"backgroundTag":"missing-required-config-field","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}