jdx/mise · error

uv project at {} has an empty project.name

Error message

uv project at {} has an empty project.name

What it means

When discovering uv project workspaces, mise requires a [project] table with a non-empty `name` in pyproject.toml. The project table exists but `project.name` is an empty string, so no valid ProjectId can be derived and discovery of that uv project fails.

Source

Thrown at src/task/workspace/uv.rs:125

        let mut known_roots = workspace_roots.clone();
        let mut queue = workspace_roots.iter().cloned().collect::<VecDeque<_>>();
        let mut manifests = BTreeMap::new();
        while let Some(project_root) = queue.pop_front() {
            if manifests.contains_key(&project_root) {
                continue;
            }
            let relative = relative_root(&canonical_root, &project_root)?;
            let pyproject_path = project_root.join(PYPROJECT_TOML);
            let pyproject = if project_root == canonical_root {
                root_pyproject.clone()
            } else {
                read_pyproject(context, &pyproject_path)?
            };
            let project = pyproject.project.as_ref().ok_or_else(|| {
                eyre::eyre!("uv project at {} is missing [project]", relative.display())
            })?;
            if project.name.is_empty() {
                bail!(
                    "uv project at {} has an empty project.name",
                    relative.display()
                );
            }
            let id = ProjectId::new(self.id(), &normalize_package_name(&project.name))?;
            let workspace_member = workspace_roots.contains(&project_root);

            for dependency in dependency_names(&pyproject) {
                let Some((source, source_base)) = effective_source(
                    &pyproject,
                    &root_pyproject,
                    &dependency,
                    workspace_member,
                    &project_root,
                    &canonical_root,
                ) else {
                    continue;
                };

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Set a non-empty name in the [project] table of the pyproject.toml at the reported path
  2. Regenerate the project with `uv init` if the file is broken scaffolding
  3. If the directory is not meant to be a uv project, remove the empty [project] table or exclude it from discovery

Example fix

# before
[project]
name = ""

# after
[project]
name = "my-uv-project"
Defensive patterns

Strategy: validation

Validate before calling

# check before running mise
import tomllib
p = tomllib.load(open('pyproject.toml','rb'))
assert p.get('project', {}).get('name'), 'project.name must be a non-empty string'

Prevention

When it happens

Trigger: uv discover (via discover_with_context) reads a pyproject.toml containing `[project]\nname = ""` or a name that serializes to empty; typically a scaffolded file where the name placeholder was deleted.

Common situations: Copied template pyproject.toml with the name blanked; regex/script-based edits that stripped the name; newly created uv project interrupted mid-init.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/b94d06f8a60484ba. Report an issue: GitHub.