{"record":{"id":"24fc2bc3aa6857eb","repo":"pola-rs/polars","slug":"not-yet-implemented-24fc2b","errorCode":null,"errorMessage":"not yet implemented","messagePattern":"not yet implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pyo3-polars/pyo3-polars/src/types.rs","lineNumber":562,"sourceCode":"                        let mapping = categories.mapping().clone();\n                        DataType::Enum(categories, mapping)\n                    },\n                    \"Date\" => DataType::Date,\n                    \"Time\" => DataType::Time,\n                    \"Datetime\" => DataType::Datetime(TimeUnit::Microseconds, None),\n                    \"Duration\" => DataType::Duration(TimeUnit::Microseconds),\n                    #[cfg(feature = \"dtype-decimal\")]\n                    \"Decimal\" => {\n                        return Err(PyTypeError::new_err(\"Decimal without specifying precision and scale is not a valid Polars data type\".to_string()));\n                    },\n                    \"List\" => DataType::List(Box::new(DataType::Null)),\n                    #[cfg(feature = \"dtype-array\")]\n                    \"Array\" => DataType::Array(Box::new(DataType::Null), 0),\n                    #[cfg(feature = \"dtype-struct\")]\n                    \"Struct\" => DataType::Struct(vec![]),\n                    \"Null\" => DataType::Null,\n                    #[cfg(feature = \"object\")]\n                    \"Object\" => todo!(),\n                    \"Unknown\" => DataType::Unknown(Default::default()),\n                    dt => {\n                        return Err(PyTypeError::new_err(format!(\n                            \"'{dt}' is not a Polars data type, or the plugin isn't compiled with the right features\",\n                        )));\n                    },\n                }\n            },\n            \"Int8\" => DataType::Int8,\n            \"Int16\" => DataType::Int16,\n            \"Int32\" => DataType::Int32,\n            \"Int64\" => DataType::Int64,\n            \"Int128\" => DataType::Int128,\n            \"UInt8\" => DataType::UInt8,\n            \"UInt16\" => DataType::UInt16,\n            \"UInt32\" => DataType::UInt32,\n            \"UInt64\" => DataType::UInt64,\n            \"UInt128\" => DataType::UInt128,","sourceCodeStart":544,"sourceCodeEnd":580,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/pyo3-polars/pyo3-polars/src/types.rs#L544-L580","documentation":"Converting a Python polars DataType to the Rust DataType hits an explicit todo!() for the \"Object\" variant (types.rs:562). pyo3-polars deliberately does not support round-tripping Object dtypes through the plugin ABI; reaching this arm means a PyObject whose dtype name is 'Object' was passed to extract and the crate was compiled with the 'object' feature, so the arm exists but is unimplemented. It aborts the process rather than returning a Python error.","triggerScenarios":"Passing a Python object with dtype Object (e.g. pl.Object) into a pyo3-polars plugin API that extracts PyDataType, when the plugin was compiled with the 'object' cargo feature enabled.","commonSituations":"Users building custom Polars plugins that accept arbitrary Series/dtype arguments containing Object columns; enabling non-default features like 'object' in a plugin's Cargo.toml without realizing Object dtype extraction is unimplemented.","solutions":["Remove Object-typed columns/arguments before calling the plugin function (e.g. df.drop(object_cols) or select only supported dtypes).","Do not enable the 'object' feature when building the pyo3-polars plugin; without it the arm is compiled out and 'Object' falls through to a clean PyTypeError instead of a panic.","If Object dtype support is required, handle it in Python-side wrapper code and never pass the dtype across the plugin boundary."],"exampleFix":"// before\nout = plugin_fn(df)  # df has an Object column, plugin built with feature \"object\"\n// after\ndf = df.drop([c for c in df.columns if df.schema[c] == pl.Object])\nout = plugin_fn(df)","handlingStrategy":"validation","validationCode":"unsupported = {c for c in df.columns if df.schema[c] == pl.Object}\nif unsupported:\n    raise TypeError(f\"plugin cannot receive Object columns: {unsupported}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not enable the 'object' cargo feature in plugin builds unless you handle Object dtype in Python first.","Filter Object columns out of DataFrames before calling plugin functions.","Remember the failure mode is a Rust panic (process abort), not a catchable Python exception."],"tags":["polars","dtype","panic","unimplemented","rust"],"backgroundTag":"method-not-implemented","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}