Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_base
-
Labels:None
-
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
- blocks
-
DM-8259 v13.0 [Fall 2016] release
- Done
This is because unicode is not in the type menu handled by PropertySet. It would work fine on python3. The quick fix is to just add an extra map of unicode to String to typeMenu.