{"record":{"id":"88377ee834271afb","repo":"odysseus-dev/odysseus","slug":"invalid-venv-path","errorCode":null,"errorMessage":"invalid venv path","messagePattern":"invalid venv path","errorType":"exception","errorClass":"ValueError","httpStatus":400,"severity":"error","filePath":"routes/shell_routes.py","lineNumber":101,"sourceCode":"    \"\"\"Build an ssh argv prefix for remote probes without local-shell parsing.\"\"\"\n    if not host or not str(host).strip() or str(host).lstrip().startswith(\"-\"):\n        raise ValueError(\"invalid ssh host\")\n    argv = [\"ssh\", \"-o\", \"ConnectTimeout=6\", \"-o\", \"StrictHostKeyChecking=no\"]\n    if ssh_port and str(ssh_port).strip() not in (\"\", \"22\"):\n        port = str(ssh_port).strip()\n        if not _SSH_PORT_RE.match(port) or not (1 <= int(port) <= 65535):\n            raise ValueError(\"invalid ssh port\")\n        argv += [\"-p\", port]\n    argv.append(str(host).strip())\n    return argv\n\n\ndef _venv_activate_prefix(venv: str | None) -> str:\n    \"\"\"Return a remote activation prefix while preserving shell expansion of ~.\"\"\"\n    if not venv:\n        return \"\"\n    if not _SAFE_VENV_RE.match(venv):\n        raise ValueError(\"invalid venv path\")\n    act = venv if venv.endswith(\"/bin/activate\") else venv.rstrip(\"/\") + \"/bin/activate\"\n    return f\". {act} && \"\n\n\nlogger = logging.getLogger(__name__)\n\nPTY_SUPPORTED = pty is not None and fcntl is not None and hasattr(os, \"setsid\")\n\n\nDOCKER_IN_CONTAINER_HINT = HOST_DOCKER_ACCESS_HINT\n\n\nDockerRowStatus = namedtuple(\"DockerRowStatus\", [\"applicable\", \"install_hint\"])\nPackageUpdateStatus = namedtuple(\"PackageUpdateStatus\", [\"available\", \"note\"])\n\n\ndef _docker_row_status(\n    *, on_remote, in_container, installed, default_hint, host_docker_access=False","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/shell_routes.py#L83-L119","documentation":"Error \"invalid venv path\" thrown in odysseus-dev/odysseus.","triggerScenarios":"Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.","commonSituations":"See trigger scenarios.","solutions":["Use a valid absolute path to the virtualenv.","Remove shell metacharacters and traversal segments from the path."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}