{"record":{"id":"bb6a94f25e53010a","repo":"pola-rs/polars","slug":"this-type-isn-t-exposed-to-python","errorCode":null,"errorMessage":"this type isn't exposed to python","messagePattern":"this type isn't exposed to python","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pyo3-polars/pyo3-polars/src/types.rs","lineNumber":484,"sourceCode":"                    })\n                    .collect::<PyResult<Vec<_>>>()?;\n                let fields = PyList::new(py, iter)?;\n                let struct_class = pl.getattr(intern!(py, \"Struct\")).unwrap();\n                struct_class.call1((fields,))\n            },\n            DataType::Null => {\n                let class = pl.getattr(intern!(py, \"Null\")).unwrap();\n                class.call0()\n            },\n            DataType::Unknown(UnknownKind::Int(v)) => {\n                PyDataType(materialize_dyn_int(*v).dtype()).into_pyobject(py)\n            },\n            DataType::Unknown(_) => {\n                let class = pl.getattr(intern!(py, \"Unknown\")).unwrap();\n                class.call0()\n            },\n            DataType::BinaryOffset => {\n                panic!(\"this type isn't exposed to python\")\n            },\n            #[allow(unreachable_patterns)]\n            _ => panic!(\"activate dtype\"),\n        }\n    }\n}\n\nimpl<'py> IntoPyObject<'py> for PySchema {\n    type Target = PyDict;\n    type Output = Bound<'py, Self::Target>;\n    type Error = PyErr;\n\n    fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error> {\n        let dict = PyDict::new(py);\n        for (k, v) in self.0.iter() {\n            dict.set_item(k.as_str(), PyDataType(v.clone()).into_pyobject(py)?)?;\n        }\n        Ok(dict)","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/pyo3-polars/pyo3-polars/src/types.rs#L466-L502","documentation":"Conversion branch marker in PyDataType::to_python for the pyo3 bridge: the Rust DataType variant being converted into a Python polars dtype object is an Unknown (non-Int) kind that has no exposed Python equivalent, so the sentinel 'this type isn't exposed to python' error fires during the conversion match.","triggerScenarios":"Thrown at pyo3-polars/pyo3-polars/src/types.rs:484 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a type that pyo3-polars exposes to Python; convert the value to a supported polars type before returning it."],"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-14T05:17:10.506Z"}