Details
-
Type:
Story
-
Status: To Do
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: daf_persistence
-
Labels:
-
Team:Data Access and Database
Description
In DM-8832, a failure to run processCcd.py ultimately led to the Butler attempting to open an empty directory. When doing so, it throws a somewhat obscure and intimidating error:
>>> Butler(tempfile.mkdtemp())
|
---------------------------------------------------------------------------
|
RuntimeError Traceback (most recent call last)
|
<ipython-input-5-4dc5ee5ae70e> in <module>()
|
----> 1 Butler(tempfile.mkdtemp())
|
|
/ssd/lsstsw/stack/Linux64/daf_persistence/12.1-17-g9654cba+1/python/lsst/daf/persistence/butler.pyc in __init__(self, root, mapper, inputs, outputs, **mapperArgs)
|
302
|
303 for args in outputs:
|
--> 304 self._addRepo(args, inout='out', defaultMapper=defaultMapper, butlerIOParents=butlerIOParents)
|
305
|
306 for args in inputs:
|
|
/ssd/lsstsw/stack/Linux64/daf_persistence/12.1-17-g9654cba+1/python/lsst/daf/persistence/butler.pyc in _addRepo(self, args, inout, defaultMapper, butlerIOParents, tags)
|
397 if defaultMapper is None:
|
398 raise RuntimeError(
|
--> 399 "Could not infer mapper and one not specified in repositoryArgs:%s" % args)
|
400 args.mapper = defaultMapper
|
401 parents = [cfgRoot for cfgRoot in list(butlerIOParents.keys()) if cfgRoot != args.cfgRoot]
|
|
RuntimeError: Could not infer mapper and one not specified in repositoryArgs:RepositoryArgs(root='/tmp/tmp8pCn6I', cfgRoot=None, mapper=None, mapperArgs={}, tags=set([]), mode='rw', policy=None)
|
While a little knowledge of what the Butler is doing makes the error understandable, it's not really helpful, particularly for those who are less familiar with the code (see the discussion at DM-8832, which was initially interpreted as being an error in the Butler due to this message).
Can we do something to make it clearer what's happening?
Attachments
Issue Links
- relates to
-
DM-8832 Butler mapper issue in validate_drp since Jenkins build 663
- Done
This came up again today, from Robert Lupton via Slack: