{"record":{"id":"9f05c95e5bfcb90e","repo":"nautechsystems/nautilus_trader","slug":"livenodeconfig-controller-for-importable-controlle","errorCode":null,"errorMessage":"LiveNodeConfig.controller for importable controller '{}' requires the python feature","messagePattern":"LiveNodeConfig\\.controller for importable controller '(.+?)' requires the python feature","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/live/src/node/builder.rs","lineNumber":599,"sourceCode":"        let runner = AsyncRunner::new();\n        runner.bind_senders();\n\n        let socket_registry = SocketReconnectRegistry::default();\n\n        let kernel = NautilusKernel::new_with_dependencies(\n            self.name.clone(),\n            self.config.clone(),\n            NautilusKernelDependencies::default()\n                .with_clock_factory(self.clock_factory.take())\n                .with_event_store_factory(self.event_store_factory.take()),\n        )?;\n        #[cfg(feature = \"python\")]\n        if let Some(controller) = self.config.controller.as_ref() {\n            Trader::add_controller_from_importable_config(&kernel.trader, controller)?;\n        }\n        #[cfg(not(feature = \"python\"))]\n        if let Some(controller) = self.config.controller.as_ref() {\n            anyhow::bail!(\n                \"LiveNodeConfig.controller for importable controller '{}' requires the python feature\",\n                controller.controller_path\n            );\n        }\n\n        self.install_external_msgbus_factory(&kernel)?;\n\n        if let Some(external_egress) = self.external_msgbus_egress.take() {\n            let config = self.config.msgbus.clone().unwrap_or_default();\n            nautilus_common::msgbus::get_message_bus()\n                .borrow_mut()\n                .set_external_egress_config(external_egress, &config)?;\n        }\n\n        for (name, factory) in self.data_client_factories {\n            if let Some(config) = self.data_client_configs.remove(&name) {\n                log::debug!(\"Creating data client {name}\");\n","sourceCodeStart":581,"sourceCodeEnd":617,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/live/src/node/builder.rs#L581-L617","documentation":"Importable controllers are loaded via Python (Trader::add_controller_from_importable_config), which requires the crate's `python` feature. Building a live node whose config specifies a controller without that feature compiled in cannot load the controller and fails at build time.","triggerScenarios":"LiveNodeConfig.controller = Some(...) (with a controller_path) while running a build of nautilus_live compiled without `--features python`, in LiveNodeBuilder::build.","commonSituations":"Deploying a Rust-only (no-Python) binary with a config copied from a Python setup; Cargo.toml missing the `python` feature; Docker image built without Python support but reusing an existing config file.","solutions":["Rebuild with the `python` feature enabled (e.g. cargo build --features python).","Remove the controller entry from LiveNodeConfig if Python support is not needed.","Implement the controller natively in Rust instead of using an importable (Python) controller path."],"exampleFix":"// before (Cargo.toml)\nnautilus_live = { version = \"...\" }\n// after\nnautilus_live = { version = \"...\", features = [\"python\"] }","handlingStrategy":"validation","validationCode":"if config.controller.is_some() && !cfg!(feature = \"python\") { /* controller unsupported in this build */ }","typeGuard":null,"tryCatchPattern":"match node_build_result { Err(e) if e.to_string().contains(\"requires the python feature\") => eprintln!(\"rebuild with --features python\"), other => other? }","preventionTips":["Align build features between environments that share config files.","Add a startup assertion that python-dependent features match the binary's features.","Strip python-specific config entries when deploying Rust-only binaries."],"tags":["rust","feature-flag","python","controller"],"backgroundTag":"feature-not-enabled","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"}