{"record":{"id":"613840bee42e1952","repo":"usestrix/strix","slug":"no-run-named-requested-under-runs-dir-name","errorCode":null,"errorMessage":"No run named '{requested}' under ./{RUNS_DIR_NAME}.","messagePattern":"No run named '(.+?)' under \\./(.+?)\\.","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"strix/interface/viewer/cli.py","lineNumber":139,"sourceCode":"    available = (\n        sorted(\n            (child.name for child in base.iterdir() if run_record_path(child).is_file()),\n            reverse=True,\n        )\n        if base.is_dir()\n        else []\n    )\n\n    if requested:\n        console.print(f\"[bold red]No run named '{requested}' under ./{RUNS_DIR_NAME}.[/]\")\n    else:\n        console.print(f\"[bold red]No runs found under ./{RUNS_DIR_NAME}.[/]\")\n\n    if available:\n        console.print(\"Available runs:\")\n        for name in available[:20]:\n            console.print(f\"  [cyan]{name}[/]\")\n    raise SystemExit(1)\n\n\n__all__ = [\"run_view\"]\n","sourceCodeStart":121,"sourceCodeEnd":143,"githubUrl":"https://github.com/usestrix/strix/blob/85513391305171ecc6faffe03da4a8bda5e3febb/strix/interface/viewer/cli.py#L121-L143","documentation":"Raised by the `run_view` viewer CLI (via SystemExit(1)) when the run name requested on the command line does not exist under ./strix_runs. The viewer enumerates run directories before opening; a mismatch between the requested name and the discovered directories aborts startup. It first prints the available run names (up to 20) to help correct the invocation.","triggerScenarios":"Running `strix view <name>` (or the equivalent viewer CLI) with a run name that has no matching directory under ./strix_runs — e.g. a typo, a renamed directory, or running the command from a working directory that contains a different (or empty) strix_runs folder.","commonSituations":"Typo in the run name; running the viewer from the wrong cwd so ./strix_runs resolves elsewhere; the run directory was deleted, moved, or archived; CI copied artifacts to a different path than where the viewer is invoked.","solutions":["Re-run the viewer without arguments (or check the printed 'Available runs' list) and use one of the listed names exactly.","Verify you are in the working directory that contains the strix_runs directory holding your run (RUNS_DIR_NAME is 'strix_runs', see strix/core/paths.py).","If the run directory was moved or renamed, move it back under ./strix_runs with the expected name.","If no runs exist at all, first complete a scan so a run directory is created."],"exampleFix":"# before\nstrix view myrun-typo\n# No run named 'myrun-typo' under ./strix_runs.\n\n# after\nstrix view            # list mode / pick from 'Available runs'\nstrix view myrun      # exact name as shown by the listing","handlingStrategy":"validation","validationCode":"from pathlib import Path\nfrom strix.core.paths import RUNS_DIR_NAME\n\ndef run_exists(cwd: Path, name: str) -> bool:\n    return (cwd / RUNS_DIR_NAME / name).is_dir()\n\navailable = sorted(p.name for p in (Path.cwd() / RUNS_DIR_NAME).glob(\"*\") if p.is_dir())\nassert run_exists(Path.cwd(), requested), f\"unknown run; available: {available[:20]}\"","typeGuard":null,"tryCatchPattern":"# SystemExit(1) with a rendered message — catch at CLI boundary only:\ntry:\n    run_view(...)\nexcept SystemExit as e:\n    print(f\"viewer aborted with code {e.code}\"); raise","preventionTips":["Always invoke the viewer from the scan's original working directory so ./strix_runs resolves to the same folder.","Run the viewer with no name first to list available runs, then script against the exact printed names.","Treat run directory names as immutable identifiers; never rename after a scan."],"tags":["cli","viewer","run-directory","user-input"],"backgroundTag":null,"analyzedSha":"85513391305171ecc6faffe03da4a8bda5e3febb","analyzedAt":"2026-08-15T05:03:57.275Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}