{"record":{"id":"d54a0d7a5bc978ba","repo":"pola-rs/polars","slug":"activate-dtype","errorCode":null,"errorMessage":"activate dtype","messagePattern":"activate dtype","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pyo3-polars/pyo3-polars/src/types.rs","lineNumber":487,"sourceCode":"                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)\n    }\n}\n","sourceCodeStart":469,"sourceCodeEnd":505,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/pyo3-polars/pyo3-polars/src/types.rs#L469-L505","documentation":"Internal conversion path in the pyo3 bridge (types.rs) marking that a Rust-side materialized dynamic integer dtype must be 'activated' — i.e. round-tripped through PyDataType/materialize_dyn_int — before it can be handed to Python, because the raw dynamic-int type has no direct Python representation.","triggerScenarios":"Thrown at pyo3-polars/pyo3-polars/src/types.rs:487 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Activate the corresponding dtype feature/flag before conversion; check which dtype is being converted and enable its support."],"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"}