{"record":{"id":"452f29c8e15443b9","repo":"pola-rs/polars","slug":"activate-binary-encoding-feature","errorCode":null,"errorMessage":"activate 'binary_encoding' feature","messagePattern":"activate 'binary_encoding' feature","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-ops/src/chunked_array/strings/namespace.rs","lineNumber":108,"sourceCode":"            },\n        };\n        polars_bail!(\n            ComputeError:\n            \"strict integer parsing failed for {} value(s): {}; error message for the \\\n            first shown value: '{}' (consider non-strict parsing)\",\n            n_failures,\n            some_failures.into_series().fmt_list(),\n            some_error_msg\n        );\n    }\n\n    Ok(out.into_series())\n}\n\npub trait StringNameSpaceImpl: AsString {\n    #[cfg(not(feature = \"binary_encoding\"))]\n    fn hex_decode(&self) -> PolarsResult<StringChunked> {\n        panic!(\"activate 'binary_encoding' feature\")\n    }\n\n    #[cfg(feature = \"binary_encoding\")]\n    fn hex_decode(&self, strict: bool) -> PolarsResult<BinaryChunked> {\n        let ca = self.as_string();\n        ca.as_binary().hex_decode(strict)\n    }\n\n    #[must_use]\n    #[cfg(feature = \"string_encoding\")]\n    fn hex_encode(&self) -> StringChunked {\n        let ca = self.as_string();\n        ca.apply_values(|s| hex::encode(s).into())\n    }\n\n    #[cfg(not(feature = \"binary_encoding\"))]\n    fn base64_decode(&self) -> PolarsResult<StringChunked> {\n        panic!(\"activate 'binary_encoding' feature\")","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-ops/src/chunked_array/strings/namespace.rs#L90-L126","documentation":"Panic in StringNameSpaceImpl::hex_decode when the binary_encoding cargo feature is disabled at compile time: the implementation is compiled out. Rebuild polars-ops with binary_encoding enabled to decode hex strings.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"activate 'binary_encoding' 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 'binary_encoding' 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 `binary_encoding` cargo feature for string binary encode/decode operations.","Perform the encoding/decoding outside polars if the feature cannot be enabled."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b5d73fd00236295624374b075d16b1fe6ec6df9","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}