nautechsystems/nautilus_trader · error

LiveNodeConfig.controller for importable controller '{}' req

Error message

LiveNodeConfig.controller for importable controller '{}' requires the python feature

What it means

Same as the builder-path variant: importable controllers need the `python` feature to be loaded by Trader::add_controller_from_importable_config. LiveNode::build on a non-python build rejects a config containing a controller.

Source

Thrown at crates/live/src/node/mod.rs:277

        if config.event_store.is_some() {
            anyhow::bail!(
                "LiveNodeConfig.event_store is set but LiveNode::build cannot install a factory; \
                 use LiveNodeBuilder::with_event_store(...) instead"
            );
        }

        let runner = AsyncRunner::new();
        runner.bind_senders();

        let kernel = NautilusKernel::new(name, config.clone())?;
        #[cfg(feature = "python")]
        if let Some(controller) = config.controller.as_ref() {
            Trader::add_controller_from_importable_config(&kernel.trader, controller)?;
        }
        #[cfg(not(feature = "python"))]
        if let Some(controller) = config.controller.as_ref() {
            anyhow::bail!(
                "LiveNodeConfig.controller for importable controller '{}' requires the python feature",
                controller.controller_path
            );
        }

        let exec_manager_config =
            ExecutionManagerConfig::from(&config.exec_engine).with_trader_id(config.trader_id);
        let exec_manager = ExecutionManager::new(
            kernel.clock.clone(),
            kernel.cache.clone(),
            exec_manager_config,
        )?;

        let node = Self {
            kernel,
            runner: Some(runner),
            config,
            handle: LiveNodeHandle::new(),

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Recompile with the `python` feature enabled.
  2. Remove the controller from the config.
  3. Replace the Python importable controller with a Rust-native implementation.

Example fix

// before
cargo build --release
// after
cargo build --release --features python
Defensive patterns

Strategy: validation

Validate before calling

if config.controller.is_some() && !cfg!(feature = "python") { /* unsupported: controller requires python feature */ }

Prevention

When it happens

Trigger: LiveNode::build (or new/from_config) with LiveNodeConfig.controller = Some(...) while compiled without the `python` feature.

Common situations: Rust-only production builds receiving configs authored for Python-enabled environments; missing feature flags in release profiles or CI builds.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/e5e85f88a81f42d8. Report an issue: GitHub.