{"record":{"id":"3e82b8d7404a26c6","repo":"pola-rs/polars","slug":"activate-product-feature","errorCode":null,"errorMessage":"activate 'product' feature","messagePattern":"activate 'product' feature","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-core/src/series/mod.rs","lineNumber":901,"sourceCode":"                UInt64 => Ok(self.u64().unwrap().prod_reduce()),\n                #[cfg(feature = \"dtype-i128\")]\n                Int128 => Ok(self.i128().unwrap().prod_reduce()),\n                #[cfg(feature = \"dtype-u128\")]\n                UInt128 => Ok(self.u128().unwrap().prod_reduce()),\n                #[cfg(feature = \"dtype-f16\")]\n                Float16 => Ok(self.f16().unwrap().prod_reduce()),\n                Float32 => Ok(self.f32().unwrap().prod_reduce()),\n                Float64 => Ok(self.f64().unwrap().prod_reduce()),\n                #[cfg(feature = \"dtype-decimal\")]\n                Decimal(..) => Ok(self.decimal().unwrap().prod_reduce()),\n                dt => {\n                    polars_bail!(InvalidOperation: \"`product` operation not supported for dtype `{dt}`\")\n                },\n            }\n        }\n        #[cfg(not(feature = \"product\"))]\n        {\n            panic!(\"activate 'product' feature\")\n        }\n    }\n\n    /// Cast throws an error if conversion had overflows\n    pub fn strict_cast(&self, dtype: &DataType) -> PolarsResult<Series> {\n        self.cast_with_options(dtype, CastOptions::Strict)\n    }\n\n    #[cfg(feature = \"dtype-decimal\")]\n    pub fn into_decimal(self, precision: usize, scale: usize) -> PolarsResult<Series> {\n        match self.dtype() {\n            DataType::Int128 => Ok(self\n                .i128()\n                .unwrap()\n                .clone()\n                .into_decimal(precision, scale)?\n                .into_series()),\n            DataType::Decimal(cur_prec, cur_scale)","sourceCodeStart":883,"sourceCodeEnd":919,"githubUrl":"https://github.com/pola-rs/polars/blob/68506541d2de983056c9eb244e1ea05fab377dfc/crates/polars-core/src/series/mod.rs#L883-L919","documentation":"Series::prod_reduce handles integer/float reductions, but if the compiled build lacks the relevant product support for the series' dtype (feature-gated arms like dtype-decimal / product feature absent) it reaches the panic telling you to rebuild polars with the 'product' feature enabled. It is a build-configuration error, not a data error.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"activate 'product' 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.","commonSituations":"Encountered when input data or configuration does not meet the preconditions of the throwing code path (\"activate 'product' 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.","solutions":["Enable the `product` cargo feature to use product aggregation.","Compute the product manually via `exp(sum(log(x)))` on positive values as a workaround."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"68506541d2de983056c9eb244e1ea05fab377dfc","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}