{"record":{"id":"b2ad29dbae5b1bfd","repo":"affaan-m/ECC","slug":"path-is-not-a-valid-directory-canonical-r","errorCode":null,"errorMessage":"Path is not a valid directory: {canonical!r}","messagePattern":"Path is not a valid directory: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scripts/lib/ecc_dashboard_runtime.py","lineNumber":68,"sourceCode":"                'cwd': path,\n                'creationflags': creationflags,\n            },\n        )\n\n    if resolved_system_name == 'Darwin':\n        return (['open', '-a', 'Terminal', path], {})\n\n    return (\n        ['x-terminal-emulator', '-e', 'bash', '-lc', 'cd -- \"$1\"; exec bash', 'bash', path],\n        {},\n    )\n\n\ndef launch_terminal(path: str) -> None:\n    \"\"\"Open a terminal at the given path after validating the target directory.\"\"\"\n    canonical = os.path.realpath(path)\n    if not os.path.isdir(canonical):\n        raise ValueError(f\"Path is not a valid directory: {canonical!r}\")\n    argv, kwargs = build_terminal_launch(canonical)\n    subprocess.Popen(argv, **kwargs)  # noqa: S603 - list argv, no shell=True, path validated above\n","sourceCodeStart":50,"sourceCodeEnd":71,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/ecc_dashboard_runtime.py#L50-L71","documentation":"Error \"Path is not a valid directory: {canonical!r}\" thrown in affaan-m/ECC.","triggerScenarios":"Thrown at scripts/lib/ecc_dashboard_runtime.py:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a path to an existing directory; the path is canonicalized with realpath before the check, so fix symlinks or typos.","Create the directory first, or launch the terminal at an existing parent directory."],"exampleFix":"launch_terminal(os.path.realpath(os.path.expanduser('~/project')))  # must exist and be a directory","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}