pola-rs/polars · error
activate 'round_series' feature
Error message
activate 'round_series' feature
What it means
Panic when applying floor-division (//) on series while the round_series feature is disabled at compile time: the floor_div_series kernel is compiled out. Rebuild with the round_series feature or express floor division via cast/truncation.
Source
Thrown at crates/polars-expr/src/expressions/binary.rs:107
_ => {
if right.dtype().is_temporal() {
return left / right;
}
left.cast(&Float64)? / right.cast(&Float64)?
},
},
Operator::FloorDivide => {
#[cfg(feature = "round_series")]
{
floor_div_series(
left.as_materialized_series(),
right.as_materialized_series(),
)
.map(Column::from)
}
#[cfg(not(feature = "round_series"))]
{
panic!("activate 'round_series' feature")
}
},
Operator::And => left.bitand(right),
Operator::Or => left.bitor(right),
Operator::LogicalOr => left
.cast(&DataType::Boolean)?
.bitor(&right.cast(&DataType::Boolean)?),
Operator::LogicalAnd => left
.cast(&DataType::Boolean)?
.bitand(&right.cast(&DataType::Boolean)?),
Operator::Xor => left.bitxor(right),
Operator::Modulus => left % right,
Operator::EqValidity => left.equal_missing(right).map(|ca| ca.into_column()),
Operator::NotEqValidity => left.not_equal_missing(right).map(|ca| ca.into_column()),
}
}
impl BinaryExpr {View on GitHub (pinned to 9b5d73fd00)
Solutions
- Enable the `round_series` cargo feature to round series values.
- Cast to float and apply manual rounding arithmetic if the feature cannot be enabled.
Defensive patterns
Strategy: fallback
When it happens
Trigger: This panic/expect fires when execution reaches an unguarded state described by: "activate 'round_series' 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 'round_series' 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/4ad84ecbb115afd9.
Report an issue: GitHub.