DEcode bytes into str

This commit is contained in:
Martin Diehl 2020-11-23 20:17:04 +01:00
parent f85dba2835
commit 7fa98ef084
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ class Result:
"""
with h5py.File(self.fname,'r') as f:
try:
return f[path].attrs[attr] if h5py3 else f[path].attrs[attr].encode()
return f[path].attrs[attr] if h5py3 else f[path].attrs[attr].decode()
except KeyError:
return None