nautechsystems/nautilus_trader · error
CreateStrategy command for importable strategy '{}' is not s
Error message
CreateStrategy command for importable strategy '{}' is not supported by the Rust controller What it means
Analogous to the actor case: in builds without the 'python' feature, the Rust controller cannot instantiate importable Python strategies. unsupported_create_strategy_config always fails CreateStrategy commands carrying an ImportableStrategyConfig with this error.
Source
Thrown at crates/system/src/controller.rs:405
fn execute_endpoint() -> MStr<Endpoint> {
Self::EXECUTE_ENDPOINT.into()
}
#[cfg(not(feature = "python"))]
fn unsupported_create_actor_config(
actor_config: &ImportableActorConfig,
) -> anyhow::Result<ActorId> {
anyhow::bail!(
"CreateActor command for importable actor '{}' is not supported by the Rust controller",
actor_config.actor_path
);
}
#[cfg(not(feature = "python"))]
fn unsupported_create_strategy_config(
strategy_config: &ImportableStrategyConfig,
) -> anyhow::Result<StrategyId> {
anyhow::bail!(
"CreateStrategy command for importable strategy '{}' is not supported by the Rust controller",
strategy_config.strategy_path
);
}
}
impl DataActor for Controller {
fn on_start(&mut self) -> anyhow::Result<()> {
self.register_execute_endpoint();
Ok(())
}
fn on_stop(&mut self) -> anyhow::Result<()> {
Self::deregister_execute_endpoint();
Ok(())
}
fn on_resume(&mut self) -> anyhow::Result<()> {View on GitHub (pinned to 18893faf8b)
Solutions
- Build with the 'python' feature enabled to support importable strategies
- Re-implement the strategy as a native Rust Strategy
- Remove the CreateStrategy command from the Rust-only deployment
Example fix
// before (rust-only build)
controller.send("CreateStrategy".into(), create_strategy_command(strategy_config))?;
// after: native Rust strategy
let strategy = MyRustStrategy::new(config);
kernel.trader().add_strategy(strategy)?; Defensive patterns
Strategy: type-guard
Validate before calling
#[cfg(not(feature = "python"))]
anyhow::ensure!(
!config_is_python_importable(&strategy_config),
"python importable strategy requires a python-enabled build"
); Type guard
fn supports_importable_python_strategies() -> bool {
cfg!(feature = "python")
} Try / catch
match controller.send("CreateStrategy".into(), cmd) {
Err(e) if e.to_string().contains("not supported by the Rust controller") => {
// migrate strategy to Rust or rebuild with python feature
}
other => other?,
} Prevention
- Audit strategy configs for import paths when moving to Rust-only builds
- Re-implement Python strategies as native Rust strategies before migration
- Check feature flags in CI for the deployed binary
When it happens
Trigger: Sending a CreateStrategy command with an ImportableStrategyConfig to a controller compiled without the 'python' feature.
Common situations: Deploying a pure-Rust trader while the trading config still lists Python strategies by import path; upgrading from a Python build to a Rust-only binary without migrating strategy definitions.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- LiveNodeConfig.controller for importable controller '{}' req
- CreateActor command for importable actor '{}' is not support
- LiveNodeConfig.controller for importable controller '{}' req
- Timedelta not supported for aggregation type: {:?}
- filter_callable {filter_callable:?} requires the Interactive
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/ce0dd27d8aece317.
Report an issue: GitHub.