encode from str to bytes

This commit is contained in:
Martin Diehl 2020-11-05 21:19:49 +01:00
parent 2b6001222d
commit e26bb962c8
1 changed files with 1 additions and 1 deletions

View File

@ -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')