Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: pex_config
-
Labels:
-
Story Points:1
-
Sprint:Science Pipelines DM-W15-3
-
Team:Data Release Production
Description
pex_config seems to split out this confusing error message when trying to enable (i.e. append to .names) a registry item that doesn't exist:
File "/home/lam3/tigress/LSST/obs_subaru/config/processCcd.py", line 51, in <module>
|
root.measurement.algorithms.names |= ["jacobian", "focalplane"]
|
File "/tigress/HSC/LSST/lsstsw/anaconda/lib/python2.7/_abcoll.py", line 330, in __ior__
|
self.add(value)
|
File "/tigress/HSC/LSST/lsstsw/stack/Linux64/pex_config/9.0+26/python/lsst/pex/config/configChoiceField.py", line 72, in add
|
r = self.__getitem__(value, at=at)
|
AttributeError: 'SelectionSet' object has no attribute '__getitem__'
|
Attachments
Issue Links
- relates to
-
DM-245 Implement HSC camera in new camera framework
- Done
Russell, tiny review for you, cleaning up some pex_config error-handling:
$ git --no-pager log --stat --reverse LSST/master..tickets/DM-1505
commit 4e8028773f2a9814e9491235b068f482ac60e49b
Author: Jim Bosch <jbosch@astro.princeton.edu>
Date: Mon Dec 15 13:00:08 2014 -0500
Fix confusing error message in multi-select RegistryFields
Adding an unknown string to .names previously triggered a
confusing error, because the code intended to handle that error
invoked SelectionSet.__getitem__ (which doesn't exist) instead of
ConfigChoiceDict.__getitem__.
python/lsst/pex/config/configChoiceField.py | 2 +-
tests/registry.py | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)