diff --git a/awips/dataaccess/PyGeometryData.py b/awips/dataaccess/PyGeometryData.py index 9c7ec30..8697830 100644 --- a/awips/dataaccess/PyGeometryData.py +++ b/awips/dataaccess/PyGeometryData.py @@ -50,7 +50,10 @@ class PyGeometryData(IGeometryData, PyData.PyData): def getNumber(self, param): t = self.getType(param) - value = self.__dataMap[param.encode('utf-8')][0] + if six.PY2: + value = self.__dataMap[param][0] + else: + value = self.__dataMap[param.encode('utf-8')][0] if t == 'INT' or t == 'SHORT' or t == 'LONG': return int(value) elif t == 'FLOAT': diff --git a/awips/dataaccess/ThriftClientRouter.py b/awips/dataaccess/ThriftClientRouter.py index db52d6b..678285f 100644 --- a/awips/dataaccess/ThriftClientRouter.py +++ b/awips/dataaccess/ThriftClientRouter.py @@ -124,7 +124,10 @@ class ThriftClientRouter(object): for gridDataRecord in response.getGridData(): locationName = gridDataRecord.getLocationName() if locationName is not None: - locData = locSpecificData[locationName.encode('utf-8')] + if six.PY2: + locData = locSpecificData[locationName] + else: + locData = locSpecificData[locationName.encode('utf-8')] else: locData = locSpecificData[locationName] if self._lazyLoadGridLatLon: