Skip to content

Commit

Permalink
Fix None when handling electronic temperature
Browse files Browse the repository at this point in the history
Signed-off-by: zjgemi <[email protected]>
  • Loading branch information
zjgemi committed Oct 13, 2024
1 parent 4d9273f commit 5f263d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dpgen2/op/collect_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5f263d3

Please sign in to comment.