## AmbiguousKernelRoot


Nothing says which configured kernel root a download belongs in.


Usage

``` python
AmbiguousKernelRoot(
    mission,
    roots,
    stored=False,
)
```


Raised by [KernelDB.root_for](KernelDB.root_for.md#spice_kernel_db.KernelDB.root_for) when several kernel roots are configured and the available facts do not single one out. [root_for](KernelDB.root_for.md#spice_kernel_db.KernelDB.root_for) derives the root from the metakernel's own path, then from the one configured root, then from where the mission's kernels already are. With several roots and none of those facts it never picks the first (decided 2026-11-21). [get_metakernel](KernelDB.get_metakernel.md#spice_kernel_db.KernelDB.get_metakernel), [update_metakernel](KernelDB.update_metakernel.md#spice_kernel_db.KernelDB.update_metakernel) and `scan_directory(archive=True)` call [root_for](KernelDB.root_for.md#spice_kernel_db.KernelDB.root_for), so they raise it too. Subclass of `LookupError`.

At a terminal the CLI lists `roots` and asks. In a script it exits with code 2, and `--download-dir` is the explicit answer.


## Attributes


`mission: str | None`  
The mission the download is for, or `None` when no mission is involved.

`roots: list[Path]`  
The candidates. When more than one root already holds kernels of the mission these are those roots, otherwise every configured root.
