skip entries that cannot be written with a printed warning

This commit is contained in:
2023-01-25 22:15:49 +01:00
parent 852bb08490
commit c26bf445e5

View File

@ -5,7 +5,10 @@ def write_dict(fn, d):
d = flatten_dict(d)
with h5py.File(fn, "w") as f:
for k, v in d.items():
f[k] = v
try:
f[k] = v
except Exception:
print("could not store:", k, "<<", v)
def flatten_dict(d, parent="", sep="/"):