pola-rs/polars · error
activate '{}' feature
Error message
activate '{}' feature What it means
feature_gated! macro panic arm: the guarded code requires cargo features that are not enabled in this build (the macro lists them in the message). Rebuild the crate with those features enabled to use the functionality.
Source
Thrown at crates/polars-error/src/lib.rs:677
}
#[inline]
#[cold]
#[must_use]
pub fn to_compute_err(err: impl Display) -> PolarsError {
PolarsError::ComputeError(err.to_string().into())
}
#[macro_export]
macro_rules! feature_gated {
($($feature:literal);*, $content:expr) => {{
#[cfg(all($(feature = $feature),*))]
{
$content
}
#[cfg(not(all($(feature = $feature),*)))]
{
panic!("activate '{}' feature", concat!($($feature, ", "),*))
}
}};
}
// Not public, referenced by macros only.
#[doc(hidden)]
pub mod __private {
#[doc(hidden)]
#[inline]
#[cold]
#[must_use]
pub const fn must_use(error: crate::PolarsError) -> crate::PolarsError {
error
}
pub const fn has_brace(s: &str) -> bool {
let bytes = s.as_bytes();
let mut i: usize = 0;View on GitHub (pinned to 9b5d73fd00)
Solutions
- Enable the cargo feature named in the error message.
- Add the feature to the polars dependency in Cargo.toml, e.g. `polars = { version = "...", features = ["<feature>"] }`.
Defensive patterns
Strategy: fallback
When it happens
Trigger: This panic/expect fires when execution reaches an unguarded state described by: "activate '{}' feature". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.
Common situations: Encountered when input data or configuration does not meet the preconditions of the throwing code path ("activate '{}' feature"). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.
AI-assisted analysis of pola-rs/polars@9b5d73fd00 (2026-08-19).
Data as JSON: /api/errors/faa3e8ca525e2b27.
Report an issue: GitHub.