From e26bb962c8c5ad1d38ee0e530a921485836b07a2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 5 Nov 2020 21:19:49 +0100 Subject: [PATCH] encode from str to bytes --- python/damask/_result.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/_result.py b/python/damask/_result.py index 0af3a1941..d5e045344 100644 --- a/python/damask/_result.py +++ b/python/damask/_result.py @@ -282,7 +282,7 @@ class Result: path_new = os.path.join(os.path.dirname(path_old),name_new) f[path_new] = f[path_old] f[path_new].attrs['Renamed'] = f'Original name: {name_old}' if h5py3 else \ - f'Original name: {name_old}'.decode() + f'Original name: {name_old}'.encode() del f[path_old] else: raise PermissionError('Rename operation not permitted')