From a821f557c51522baa67d32bc432e19606954a4e8 Mon Sep 17 00:00:00 2001 From: Mattia Mancini <mancini@astron.nl> Date: Mon, 23 Mar 2020 14:53:20 +0100 Subject: [PATCH] Fix runtime error Fix runtime error exception in which the decode method was called on a str like object --- losoto/h5parm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/losoto/h5parm.py b/losoto/h5parm.py index 9f29c48f..674f737c 100644 --- a/losoto/h5parm.py +++ b/losoto/h5parm.py @@ -704,7 +704,8 @@ def __init__(self, soltab, useCache = False, args = {}): self.name = soltab._v_name # list of axes names, set once to speed up calls - axesNamesInH5 = soltab.val.attrs['AXES'].decode() + axesNamesInH5 = soltab.val.attrs['AXES'] + axesNamesInH5 = axesNamesInH5.decode() if isinstance(axesNamesInH5, bytes) else axesNamesInH5 self.axesNames = axesNamesInH5.split(',') # dict of axes values, set once to speed up calls (a bit of memory usage though)