{"record":{"id":"fa42221dfc8214ae","repo":"slint-ui/slint","slug":"implemented-type-conversion","errorCode":null,"errorMessage":"implemented type conversion {:#?}","messagePattern":"implemented type conversion (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/compiler/generator/python.rs","lineNumber":710,"sourceCode":"        },\n        Type::Enumeration(enumeration) => {\n            if enumeration.node.is_some() {\n                ident(&enumeration.name)\n            } else {\n                SmolStr::new_static(\"None\")\n            }\n        }\n        Type::Callback(function) | Type::Function(function) => {\n            format_smolstr!(\n                \"typing.Callable[[{}], {}]\",\n                function.args.iter().map(python_type_name).join(\", \"),\n                python_type_name(&function.return_type)\n            )\n        }\n        Type::Keys => SmolStr::new_static(\"slint.Keys\"),\n        Type::DataTransfer => SmolStr::new_static(\"slint.DataTransfer\"),\n        Type::MouseCursor => SmolStr::new_static(\"None\"),\n        ty => unimplemented!(\"implemented type conversion {:#?}\", ty),\n    }\n}\n","sourceCodeStart":692,"sourceCodeEnd":713,"githubUrl":"https://github.com/slint-ui/slint/blob/a9ea814a5813e7460fa1a867924872095a4d678d/internal/compiler/generator/python.rs#L692-L713","documentation":"The compiler's Python code generator (internal/compiler/generator/python.rs) maps every public Type to a Python annotation name; a type outside the handled set panics with (sic) 'implemented type conversion {ty}' — the message is missing an 'un', it means unimplemented. The panic occurs at code-generation time, i.e. while producing Python code, not at runtime.","triggerScenarios":"Generating Python output (slint-compiler --language python or the Python build pipeline) from .slint whose exported properties/callbacks/functions use a type python_type_name cannot name, e.g. easing- or path-data-typed public API.","commonSituations":"A new type added to the compiler before generator support catches up; internal types leaking into a component's public signature; generated-code CI suddenly failing after a compiler update.","solutions":["Remove the offending type from the component's public API (don't export it as property/callback/function); keep it internal.","Update to a slint version whose Python generator handles the type.","Report upstream with the type printed in the panic message ('implemented type conversion <ty>')."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# CI step: run the Python code generation over all .slint files; a panic fails the build\nset -e\nfor f in $(find ui -name '*.slint'); do\n  slint-compiler --language python \"$f\" > /dev/null\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the generator in CI over every .slint file so unmappable types fail the build, not production.","Keep public component APIs limited to well-supported types (numbers, string, bool, color, image, models, structs, enums).","Regenerate and test after compiler upgrades before merging."],"tags":["codegen","python","compiler","types","panic"],"backgroundTag":"unsupported-type-conversion","analyzedSha":"a9ea814a5813e7460fa1a867924872095a4d678d","analyzedAt":"2026-08-16T22:39:12.830Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}