Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-8251

Unicode string not being interpreted correctly.

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: daf_base
    • Labels:
      None
    • Templates:
    • Story Points:
      0.5
    • Team:
      Architecture

      Description

      The following (running on lsst-qserv-dax01)

      dataRoot="/datasets/gapon/data/DC_2013/calexps/"
      butlerPolicy="calexp"
      ids = id {'filter': u'g', 'field': 694, 'camcol': 4, 'run': 5646}
       
      def getImageByIds(self, ids):
          butler = lsst.daf.persistence.Butler(dataRoot)
          img = butler.get(butlerPolicy, dataId=ids)
          return img, butler
      

      Results in this error

        File "/lsst/stack/dax_imgserv/python/lsst/dax/imgserv/locateImage.py", line 286, in getImageByIds
          img = butler.get(self._butlerPolicy, dataId=ids)
        File "/lsst/stack/Linux64/daf_persistence/12.1/python/lsst/daf/persistence/butler.py", line 586, in get
          location = repoData.repo.map(datasetType, dataId)
        File "/lsst/stack/Linux64/daf_persistence/12.1/python/lsst/daf/persistence/repository.py", line 180, in map
          loc = self._mapper.map(*args, **kwargs)
        File "/lsst/stack/Linux64/daf_persistence/12.1/python/lsst/daf/persistence/mapper.py", line 173, in map
          return func(self.validate(dataId), write)
        File "/lsst/stack/Linux64/daf_butlerUtils/12.1+1/python/lsst/daf/butlerUtils/cameraMapper.py", line 294, in mapClosure
          return mapping.map(mapper, dataId, write)
        File "/lsst/stack/Linux64/daf_butlerUtils/12.1+1/python/lsst/daf/butlerUtils/mapping.py", line 142, in map
          return ButlerLocation(self.python, self.persistable, self.storage, path, additionalData, mapper)
        File "/lsst/stack/Linux64/daf_persistence/12.1/python/lsst/daf/persistence/butlerLocation.py", line 62, in __init__
          self.additionalData.set(k, v)
        File "/lsst/stack/Linux64/daf_base/12.1/python/lsst/daf/base/baseLib.py", line 4136, in _PS_setValue
          return _propertyContainerSet(self, name, value, _PS_typeMenu)
        File "/lsst/stack/Linux64/daf_base/12.1/python/lsst/daf/base/baseLib.py", line 4098, in _propertyContainerSet
          raise lsst.pex.exceptions.TypeError("Unknown value type for %s: %s" % (name, t))
      TypeError: Unknown value type for filter: <type 'unicode'>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tjenness Tim Jenness
                Reporter:
                jgates John Gates
                Reviewers:
                John Gates
                Watchers:
                John Gates, John Parejko, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel