Fix: Gracefully handle errors during pip package enumeration

This commit is contained in:
Pome 2025-11-10 10:56:32 +09:00
parent 0fcdcc93a2
commit ed141e7850

View File

@ -2664,9 +2664,13 @@ def check_state_of_git_node_pack_single(item, do_fetch=False, do_update_check=Tr
def get_installed_pip_packages(): def get_installed_pip_packages():
# extract pip package infos try:
cmd = manager_util.make_pip_cmd(['freeze']) # extract pip package infos
pips = subprocess.check_output(cmd, text=True).split('\n') cmd = manager_util.make_pip_cmd(['freeze'])
pips = subprocess.check_output(cmd, text=True).split('\n')
except Exception as e:
logging.warning("[ComfyUI-Manager] Could not enumerate pip packages for snapshot: %s", e)
return {}
res = {} res = {}
for x in pips: for x in pips: