{"record":{"id":"7a7abebd7662feba","repo":"LykosAI/StabilityMatrix","slug":"installed-package-path-is-not-available","errorCode":null,"errorMessage":"Installed package path is not available.","messagePattern":"Installed package path is not available\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs","lineNumber":71,"sourceCode":"            WindowsRocmPackageCommandType.SageAttention => \"Installing Windows ROCm SageAttention\",\n            WindowsRocmPackageCommandType.DevelopmentSdk => \"Installing Windows ROCm Development SDK\",\n            WindowsRocmPackageCommandType.BitsAndBytes => \"Installing Windows ROCm bitsandbytes\",\n            WindowsRocmPackageCommandType.FlashAttention => \"Installing Windows ROCm Flash Attention\",\n            _ => \"Running Windows ROCm package command\",\n        };\n\n    public async Task ExecuteAsync(IProgress<ProgressReport>? progress = null)\n    {\n        if (!OperatingSystem.IsWindows())\n        {\n            throw new PlatformNotSupportedException(\n                \"Windows ROCm package commands are only supported on Windows.\"\n            );\n        }\n\n        if (InstalledPackage.FullPath is null)\n        {\n            throw new InvalidOperationException(\"Installed package path is not available.\");\n        }\n\n        var venvDir = WorkingDirectory.JoinDir(\"venv\");\n        if (!venvDir.Exists)\n        {\n            throw new DirectoryNotFoundException($\"ComfyUI venv was not found at '{venvDir.FullPath}'.\");\n        }\n\n        var pyVersion = PyVersion.Parse(InstalledPackage.PythonVersion);\n        if (pyVersion.StringValue == \"0.0.0\")\n        {\n            pyVersion = PyInstallationManager.Python_3_10_11;\n        }\n\n        var baseInstall = !string.IsNullOrWhiteSpace(InstalledPackage.PythonVersion)\n            ? new PyBaseInstall(\n                await pyInstallationManager.GetInstallationAsync(pyVersion).ConfigureAwait(false)\n            )","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs#L53-L89","documentation":"InstallWindowsRocmPackageCommandStep.ExecuteAsync throws this InvalidOperationException when the InstalledPackage supplied to the step has a null FullPath. The step needs the package's install directory to resolve the venv and Python version it will patch with Windows ROCm components. Without a FullPath the step cannot proceed, so it fails fast with a clear message.","triggerScenarios":"Constructing the step with InstalledPackage whose FullPath property is null (e.g. a package record that was never fully installed/registered, or a deserialized/stub InstalledPackage) and calling ExecuteAsync on Windows.","commonSituations":"Running a ROCm one-click install step against a package entry that failed mid-install, was imported from a corrupted shared_db record, or was constructed manually without setting the install path; also happens if package paths point to drives that were removed and the app nulls the path.","solutions":["Ensure the package is fully installed and its FullPath is set (check the package record in the ComfyPackageManager / shared_db) before queuing this step.","Reinstall or re-add the package so the install directory is re-registered, then retry the ROCm command.","Before executing, guard: if (step.InstalledPackage.FullPath is null) { /* repair or abort */ }","If constructing the step manually, pass the actual installed package directory rather than a placeholder InstalledPackage."],"exampleFix":"// before\nvar step = new InstallWindowsRocmPackageCommandStep(...) { InstalledPackage = partialPackage, ... };\nawait step.ExecuteAsync(progress);\n// after\nif (partialPackage.FullPath is null)\n    throw new InvalidOperationException(\"Package must be installed before running ROCm steps.\");\nawait step.ExecuteAsync(progress);","handlingStrategy":"validation","validationCode":"if (installedPackage?.FullPath is null)\n    throw new InvalidOperationException(\"Package must be fully installed (FullPath set) before running Windows ROCm steps.\");","typeGuard":"bool CanRunRocmStep(InstalledPackage p) => !string.IsNullOrEmpty(p?.FullPath);","tryCatchPattern":"try\n{\n    await step.ExecuteAsync(progress);\n}\ncatch (InvalidOperationException ex) when (ex.Message == \"Installed package path is not available.\")\n{\n    // repair/reinstall package, then requeue\n}","preventionTips":["Only queue ROCm steps for packages whose install completed successfully.","Validate package records (FullPath non-null) when loading from the database.","Guard manually constructed steps by asserting FullPath at construction time."],"tags":["null-argument","invalid-state","rocm","windows"],"backgroundTag":"null-argument","analyzedSha":"af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002","analyzedAt":"2026-09-12T19:02:43.389Z","contentChangedAt":"2026-09-12T19:02:43.389Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}