{"record":{"id":"e7a70273ffdd855e","repo":"astral-sh/uv","slug":"expected-the-output-filename-to-be-pylock-toml-o-e7a702","errorCode":null,"errorMessage":"Expected the output filename to be `pylock.toml` or `pylock.<name>.toml`, where `<name>` is non-empty and contains no dots; found `{file_name}`","messagePattern":"Expected the output filename to be `pylock\\.toml` or `pylock\\.<name>\\.toml`, where `<name>` is non-empty and contains no dots; found `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/uv/src/commands/project/export.rs","lineNumber":373,"sourceCode":"        } else {\n            ExportFormat::RequirementsTxt\n        }\n    });\n\n    // Skip conflict detection for CycloneDX exports, as SBOMs are meant to document all dependencies including conflicts.\n    if !matches!(format, ExportFormat::CycloneDX1_5) {\n        detect_conflicts(&target, &extras, &groups)?;\n    }\n\n    // If the user is exporting to PEP 751, ensure the filename matches the specification.\n    if matches!(format, ExportFormat::PylockToml) {\n        if let Some(file_name) = output_file\n            .as_deref()\n            .and_then(Path::file_name)\n            .and_then(OsStr::to_str)\n        {\n            if !is_pylock_toml(file_name) {\n                return Err(anyhow!(\n                    \"Expected the output filename to be `pylock.toml` or `pylock.<name>.toml`, where `<name>` is non-empty and contains no dots; found `{file_name}`\",\n                ));\n            }\n        }\n    }\n\n    // Generate the export.\n    match format {\n        ExportFormat::RequirementsTxt => {\n            let export = RequirementsTxtExport::from_lock(\n                &target,\n                &prune,\n                &extras,\n                &groups,\n                include_annotations,\n                editable,\n                hashes,\n                &install_options,","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv/src/commands/project/export.rs#L355-L391","documentation":"Error \"Expected the output filename to be `pylock.toml` or `pylock.<name>.toml`, where `<name>` is non-empty and contains no dots; found `{file_name}`\" thrown in astral-sh/uv.","triggerScenarios":"Thrown at crates/uv/src/commands/project/export.rs:373 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f1a42680ff5272232d65748acf338b19778dde24","analyzedAt":"2026-08-16T04:51:47.599Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}