pola-rs/polars · error
object not supported
Error message
object not supported
What it means
Extraction arm in the pyo3 dtype bridge (types.rs) for an unsupported Python object dtype: the Python-side polars dtype is the generic Object type, which cannot be represented on the Rust side, so extraction fails with the 'object not supported' marker.
Source
Thrown at pyo3-polars/pyo3-polars/src/types.rs:646
let inner = ob.getattr(intern!(py, "inner")).unwrap();
let size = ob.getattr(intern!(py, "size")).unwrap();
let inner = inner.extract::<PyDataType>()?;
let size = size.extract::<usize>()?;
DataType::Array(Box::new(inner.0), size)
},
#[cfg(feature = "dtype-struct")]
"Struct" => {
let fields = ob.getattr(intern!(py, "fields"))?;
let fields = fields
.extract::<Vec<PyField>>()?
.into_iter()
.map(|f| f.0)
.collect::<Vec<Field>>();
DataType::Struct(fields)
},
"Null" => DataType::Null,
#[cfg(feature = "object")]
"Object" => panic!("object not supported"),
"Unknown" => DataType::Unknown(Default::default()),
dt => {
return Err(PyTypeError::new_err(format!(
"'{dt}' is not a Polars data type, or the plugin isn't compiled with the right features",
)));
},
};
Ok(PyDataType(dtype))
}
}
View on GitHub (pinned to 9b5d73fd00)
Solutions
- Object dtype is not supported here; convert to a supported polars dtype before this operation.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at pyo3-polars/pyo3-polars/src/types.rs:646 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pola-rs/polars@9b5d73fd00 (2026-08-19).
Data as JSON: /api/errors/c955c49c077dab63.
Report an issue: GitHub.