nautechsystems/nautilus_trader · error · anyhow::Error

Cloud storage support requires the 'cloud' feature: {uri}

Error message

Cloud storage support requires the 'cloud' feature: {uri}

What it means

create_object_store_location_from_path recognizes cloud storage URIs (s3, gs/gcs, azure/az/abfs, http/https) but this build of nautilus-persistence was compiled without the 'cloud' feature, so no cloud object store implementations are available. It bails instead of silently failing later.

Source

Thrown at crates/persistence/src/parquet.rs:549

        }
        #[cfg(feature = "cloud")]
        s if s.starts_with("az://") => create_azure_store(&uri, storage_options),
        #[cfg(feature = "cloud")]
        s if s.starts_with("abfs://") => create_abfs_store(&uri, storage_options),
        #[cfg(feature = "cloud")]
        s if s.starts_with("http://") || s.starts_with("https://") => {
            create_http_store(&uri, storage_options)
        }
        #[cfg(not(feature = "cloud"))]
        s if s.starts_with("s3://")
            || s.starts_with("gs://")
            || s.starts_with("gcs://")
            || s.starts_with("az://")
            || s.starts_with("abfs://")
            || s.starts_with("http://")
            || s.starts_with("https://") =>
        {
            anyhow::bail!("Cloud storage support requires the 'cloud' feature: {uri}")
        }
        s if s.starts_with("file://") => create_local_store(&uri, true),
        _ => create_local_store(&uri, false), // Fallback: assume local path
    }?;

    let kind = Url::parse(&original_uri)
        .ok()
        .filter(|url| is_remote_uri_scheme(url.scheme()))
        .map(|_| {
            remote_store_root_url(&original_uri)
                .map(|store_root_url| ObjectStoreLocationKind::Remote { store_root_url })
        })
        .transpose()?
        .unwrap_or(ObjectStoreLocationKind::Local);

    Ok(ObjectStoreLocation {
        object_store,
        base_path,

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Rebuild with the cloud feature: add features = ["cloud"] to nautilus-persistence in Cargo.toml or run cargo build --features cloud.
  2. Until rebuilt, switch the catalog URI to a local path (file:// or plain path).
  3. In Python distributions, install a build/wheel that includes cloud storage support.
  4. If only local storage is intended, correct the URI scheme, which was likely copied by mistake.

Example fix

// before — Cargo.toml
nautilus-persistence = "0.x"
// after
nautilus-persistence = { version = "0.x", features = ["cloud"] }
Defensive patterns

Strategy: validation

Validate before calling

const CLOUD_SCHEMES: [&str; 7] = ["s3://", "gs://", "gcs://", "az://", "abfs://", "http://", "https://"];
fn needs_cloud_feature(uri: &str) -> bool {
    CLOUD_SCHEMES.iter().any(|s| uri.starts_with(s))
}
// if needs_cloud_feature(uri) { assert cloud feature enabled at startup }

Try / catch

match ParquetDataCatalog::from_uri(uri, None) {
    Err(e) if e.to_string().contains("requires the 'cloud' feature") => {
        // fall back to a local file:// catalog or rebuild with --features cloud
    }
    other => other?,
}

Prevention

When it happens

Trigger: Creating a ParquetDataCatalog (or calling from_uri / create_object_store_from_path / py_new) with a URI like s3://bucket/path, gcs://..., az://..., or https://... while the crate was built without features = ["cloud"].

Common situations: Using a slim/pure-Rust build in Docker or CI; default cargo build without extra features; copying configuration from a cloud deployment to a local-only build.

Related errors


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