diff --git a/awips/dataaccess/PyData.py b/awips/dataaccess/PyData.py index 52f0b28..6b09af5 100644 --- a/awips/dataaccess/PyData.py +++ b/awips/dataaccess/PyData.py @@ -23,8 +23,8 @@ class PyData(IData): self.__attributes = dataRecord.getAttributes() def getAttribute(self, key): - value = self.__attributes[key.encode('utf-8')] - return value.decode('utf-8') + value = self.__attributes[key] + return value def getAttributes(self): return list(self.__attributes.keys()) @@ -33,7 +33,7 @@ class PyData(IData): return self.__time def getLevel(self): - return self.__level.decode('utf-8') + return self.__level def getLocationName(self): return self.__locationName diff --git a/awips/dataaccess/PyGeometryData.py b/awips/dataaccess/PyGeometryData.py index c7bec79..01575b4 100644 --- a/awips/dataaccess/PyGeometryData.py +++ b/awips/dataaccess/PyGeometryData.py @@ -37,13 +37,11 @@ class PyGeometryData(IGeometryData, PyData.PyData): return list(self.__dataMap.keys()) def getString(self, param): - param = param.encode('utf-8') value = self.__dataMap[param][0] - return value.decode('utf-8') + return value def getNumber(self, param): t = self.getType(param) - param = param.encode('utf-8') value = self.__dataMap[param][0] if t == 'INT' or t == 'SHORT' or t == 'LONG': return int(value) @@ -52,14 +50,12 @@ class PyGeometryData(IGeometryData, PyData.PyData): elif t == 'DOUBLE': return float(value) else: - raise TypeError("Data for parameter " + param.decode('utf-8') + " is not a numeric type.") + raise TypeError("Data for parameter " + param + " is not a numeric type.") def getUnit(self, param): - param = param.encode('utf-8') unit = self.__dataMap[param][2] - return unit.decode('utf-8') + return unit def getType(self, param): - param = param.encode('utf-8') type = self.__dataMap[param][1] - return type.decode('utf-8') + return type