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

want to see locations in trace when butler raises because multiple locations were found

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: butler
    • Labels:
      None
    • Templates:
    • Story Points:
      1
    • Team:
      Data Access and Database

      Description

      daf_persistence 11.0-2-g56eb0a1+1 gives the unhelpful error message:

      > RuntimeError: Unable to retrieve bias for {'category': 'A', 'taiObs': '2015-12-22', 'visit': 7292, 'site': 'S', 'dateObs': '2015-12-22', 'filter': 'PFS-M', 'field': 'DARK', 'spectrograph': 2, 'ccd': 5}: No unique lookup for ['calibDate', 'calibVersion'] from {'category': 'A', 'taiObs': '2015-12-22', 'visit': 7292, 'site': 'S', 'dateObs': '2015-12-22', 'filter': 'PFS-M', 'field': 'DARK', 'spectrograph': 2, 'ccd': 5}: 2 matches
      

      (the old butler did this too). The user wants to know what the 2 matches were – it's user error, but the user needs help and
      printing the first few options (nicely formatted) is very useful. I think I did this on the HSC side.

      The butler code in question is actually in butlerUtils/python/lsst/daf/butlerUtils/mapping.py and my post-doc gave me the wrong package.

      It's in need():

      >         if len(lookups) != 1:
      >             raise RuntimeError, "No unique lookup for %s from %s: %d matches" % (newProps, newId, len(lookups))
      

        Attachments

          Container Issues

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                npease Nate Pease
                Watchers:
                Nate Pease
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel