{"record":{"id":"20b1c01c6b3dd1cd","repo":"pola-rs/polars","slug":"dtype-not-supported","errorCode":null,"errorMessage":"dtype {:?} not supported","messagePattern":"dtype (.+?) not supported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-python/src/utils.rs","lineNumber":68,"sourceCode":"                CategoricalPhysical::U8 => $self.cat8().unwrap().$method($($args),*),\n                CategoricalPhysical::U16 => $self.cat16().unwrap().$method($($args),*),\n                CategoricalPhysical::U32 => $self.cat32().unwrap().$method($($args),*),\n            },\n\n            #[cfg(feature = \"object\")]\n            DataType::Object(_) => {\n                $self\n                .as_any()\n                .downcast_ref::<ObjectChunked<ObjectValue>>()\n                .unwrap()\n                .$method($($args),*)\n            },\n            DataType::Map(_, _) => $self.map().unwrap().$method($($args),*),\n            DataType::Extension(_, _) => $self.ext().unwrap().$method($($args),*),\n\n            DataType::Null => $self.null().unwrap().$method($($args),*),\n\n            dt @ (DataType::BinaryOffset | DataType::Unknown(_)) => panic!(\"dtype {:?} not supported\", dt)\n        }\n    }\n}\n\n/// Boilerplate for `|e| PyPolarsErr::from(e).into()`\n#[allow(unused)]\npub(crate) fn to_py_err<E: Into<PyPolarsErr>>(e: E) -> PyErr {\n    e.into().into()\n}\n\npub trait EnterPolarsExt {\n    /// Whenever you have a block of code in the public Python API that\n    /// (potentially) takes a long time, wrap it in enter_polars. This will\n    /// ensure we release the GIL and catch KeyboardInterrupts.\n    ///\n    /// This not only can increase performance and usability, it can avoid\n    /// deadlocks on the GIL for Python UDFs.\n    fn enter_polars<T, E, F>(self, f: F) -> PyResult<T>","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/pola-rs/polars/blob/68506541d2de983056c9eb244e1ea05fab377dfc/crates/polars-python/src/utils.rs#L50-L86","documentation":"Fallback arm of the python method-dispatch macro: the series dtype is not any of the supported variants (numeric, string, categorical, object, ...), so the requested method cannot be dispatched on it. The message names the unsupported dtype; convert the series first.","triggerScenarios":"Passing a value of an unsupported dtype into a Polars conversion utility.","commonSituations":"See trigger scenarios.","solutions":["Convert the value to a supported dtype before passing it across the Python/Rust boundary; check the dtype with s.dtype."],"exampleFix":"s = s.cast(pl.Int64)  # use a supported dtype","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-14T00:17:10.932Z"}