diff --git a/dpgen2/op/collect_data.py b/dpgen2/op/collect_data.py index b1e057e5..68f397ff 100644 --- a/dpgen2/op/collect_data.py +++ b/dpgen2/op/collect_data.py @@ -95,9 +95,9 @@ def execute( ms = dpdata.MultiSystems(type_map=type_map) for ii in labeled_data: - if len(list(ii.rglob("fparam.npy"))) > 0: + if ii and len(list(ii.rglob("fparam.npy"))) > 0: setup_ele_temp(False) - if len(list(ii.rglob("aparam.npy"))) > 0: + if ii and len(list(ii.rglob("aparam.npy"))) > 0: setup_ele_temp(True) ss = dpdata.LabeledSystem(ii, fmt="deepmd/npy") ms.append(ss)