astral-sh/uv · error
`pyproject.toml` is not a supported output format for `{}` (
Error message
`pyproject.toml` is not a supported output format for `{}` (only `requirements.txt`-style output is supported) What it means
Error "`pyproject.toml` is not a supported output format for `{}` (only `requirements.txt`-style output is supported)" thrown in astral-sh/uv.
Source
Thrown at crates/uv/src/commands/pip/compile.rs:136
annotation_style: AnnotationStyle,
link_mode: LinkMode,
mut python: Option<String>,
system: bool,
python_preference: PythonPreference,
concurrency: Concurrency,
quiet: bool,
cache: Cache,
workspace_cache: WorkspaceCache,
printer: Printer,
preview: Preview,
) -> Result<ExitStatus> {
// If the user provides a `pyproject.toml` or other TOML file as the output file, raise an
// error.
if output_file
.and_then(Path::file_name)
.is_some_and(|name| name.eq_ignore_ascii_case("pyproject.toml"))
{
return Err(anyhow!(
"`pyproject.toml` is not a supported output format for `{}` (only `requirements.txt`-style output is supported)",
"uv pip compile".green()
));
}
// Determine the output format.
let format = format.unwrap_or_else(|| {
let extension = output_file.and_then(Path::extension);
if extension.is_some_and(|ext| ext.eq_ignore_ascii_case("txt")) {
PipCompileFormat::RequirementsTxt
} else if extension.is_some_and(|ext| ext.eq_ignore_ascii_case("toml")) {
PipCompileFormat::PylockToml
} else {
PipCompileFormat::RequirementsTxt
}
});
// If the user is exporting to PEP 751, ensure the filename matches the specification.View on GitHub (pinned to f1a42680ff)
When it happens
Trigger: Thrown at crates/uv/src/commands/pip/compile.rs:136 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astral-sh/uv@f1a42680ff (2026-08-16).
Data as JSON: /api/errors/32dc73562ad71790.
Report an issue: GitHub.