slint-ui/slint · error
implemented type conversion {:#?}
Error message
implemented type conversion {:#?} What it means
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.
Source
Thrown at internal/compiler/generator/python.rs:710
},
Type::Enumeration(enumeration) => {
if enumeration.node.is_some() {
ident(&enumeration.name)
} else {
SmolStr::new_static("None")
}
}
Type::Callback(function) | Type::Function(function) => {
format_smolstr!(
"typing.Callable[[{}], {}]",
function.args.iter().map(python_type_name).join(", "),
python_type_name(&function.return_type)
)
}
Type::Keys => SmolStr::new_static("slint.Keys"),
Type::DataTransfer => SmolStr::new_static("slint.DataTransfer"),
Type::MouseCursor => SmolStr::new_static("None"),
ty => unimplemented!("implemented type conversion {:#?}", ty),
}
}
View on GitHub (pinned to a9ea814a58)
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>').
Defensive patterns
Strategy: validation
Validate before calling
# CI step: run the Python code generation over all .slint files; a panic fails the build set -e for f in $(find ui -name '*.slint'); do slint-compiler --language python "$f" > /dev/null done
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- not implemented
- Could not compile {path}
- Could not compile ${filePath}
- Callback '{name}' in global '{global_name}' cannot be used w
- Callback '{name}' in global '{global_name}' cannot be used w
AI-assisted analysis of slint-ui/slint@a9ea814a58 (2026-08-16).
Data as JSON: /api/errors/fa42221dfc8214ae.
Report an issue: GitHub.