Guard against None base_dir in _collect_output_absolute_paths
Some checks are pending
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Build package / Build Test (3.10) (push) Waiting to run
Build package / Build Test (3.11) (push) Waiting to run
Build package / Build Test (3.12) (push) Waiting to run
Build package / Build Test (3.13) (push) Waiting to run
Build package / Build Test (3.14) (push) Waiting to run

Return early with an empty list when folder_paths.get_directory_by_type('output')
returns None to avoid os.path.join(None, ...) producing invalid paths.

Amp-Thread-ID: https://ampcode.com/threads/T-019cfbe5-dffc-760a-9a37-9b041dd71e73
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Luke Mino-Altherr 2026-03-17 09:05:15 -04:00
parent 8973162def
commit ca661150ad

View File

@ -245,6 +245,8 @@ def _collect_output_absolute_paths(history_result: dict) -> list[str]:
"""Extract absolute file paths for output items from a history result."""
paths = []
base_dir = folder_paths.get_directory_by_type("output")
if base_dir is None:
return paths
for node_output in history_result.get("outputs", {}).values():
for items in node_output.values():
if not isinstance(items, list):