flxzt/rnote · error
Exporting selection to format with extension
Error message
Exporting selection to format with extension "{ext}" is not supported. What it means
Validation error in get_selection_export_format: the user-supplied --export-format string does not match any supported selection export extension (svg, png, jpg, jpeg), so no SelectionExportFormat variant can be built and selection export cannot proceed.
Solutions
- Re-run with a supported --export-format value: svg, png, jpg, or jpeg.
- Check the format string for typos or casing; matching is exact and case-sensitive.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/rnote-cli/src/export.rs:409 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of flxzt/rnote@bbc5354502 (2026-09-08).
Data as JSON: /api/errors/da4b9d55e194d765.
Report an issue: GitHub.
Appendix: source
Thrown at crates/rnote-cli/src/export.rs:409
let prefs = SelectionExportPrefs {
export_format: format,
with_background: !no_background,
with_pattern: !no_pattern,
optimize_printing,
bitmap_scalefactor,
jpeg_quality,
margin,
};
Ok(prefs)
}
fn get_selection_export_format(format: &str) -> anyhow::Result<SelectionExportFormat> {
match format {
"svg" => Ok(SelectionExportFormat::Svg),
"png" => Ok(SelectionExportFormat::Png),
"jpg" | "jpeg" => Ok(SelectionExportFormat::Jpeg),
ext => Err(anyhow::anyhow!(
"Exporting selection to format with extension \"{ext}\" is not supported."
)),
}
}
pub(crate) fn get_output_file_path(
initial_output_file: &Path,
on_conflict: OnConflict,
on_conflict_overwrite: &mut Option<OnConflict>,
export_command: &cli::ExportCommand,
) -> anyhow::Result<PathBuf> {
match export_command {
// output file will be ignored when parsing output file
cli::ExportCommand::DocPages { .. } => Ok(initial_output_file.to_path_buf()),
_ => Ok(file_conflict_prompt_action(
initial_output_file,
on_conflict,
on_conflict_overwrite,View on GitHub (pinned to bbc5354502)