diff --git a/cadet/cadet.py b/cadet/cadet.py index 85c7a12..b4ef473 100644 --- a/cadet/cadet.py +++ b/cadet/cadet.py @@ -145,11 +145,12 @@ def recursively_load( h5file, path, func, paths): ans = Dict() if paths is not None: for path in paths: - item = h5file[path] - if isinstance(item, h5py._hl.dataset.Dataset): - ans[path[1:]] = item[()] - elif isinstance(item, h5py._hl.group.Group): - ans[path[1:]] = recursively_load(h5file, path + '/', func, None) + item = h5file.get(path, None) + if item is not None: + if isinstance(item, h5py._hl.dataset.Dataset): + ans[path[1:]] = item[()] + elif isinstance(item, h5py._hl.group.Group): + ans[path[1:]] = recursively_load(h5file, path + '/', func, None) else: for key_original in h5file[path].keys(): key = func(key_original) diff --git a/setup.py b/setup.py index 36fb7af..ee6f1d1 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="CADET", - version="0.4", + version="0.5", author="William Heymann", author_email="w.heymann@fz-juelich.de", description="CADET is a python interface to the CADET chromatography simulator",