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

Registry.queryCollections raises MissingCollectionError

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: daf_butler
    • Labels:
      None
    • Team:
      Data Release Production
    • Urgent?:
      No

      Description

      Calling lsst.daf.butler.Registry.queryCollections with the name of a collection that is not present raises MissingCollectionError. From the documentation, I expect it to return an iterator over an empty iterable instead.

      Minimal example:

      from lsst.daf.butler import Butler
      butler = Butler(Butler.makeRepo("foo"))
      list(butler.registry.queryCollections("collected"))
      

      The same behavior occurs when passing ["collected"]. Passing re.compile("collected") returns an empty iterator, as expected. I have not tested a tuple or a mapping, since I'm not sure how to construct a valid example.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              krzys Krzysztof Findeisen
              Watchers:
              Jim Bosch, Krzysztof Findeisen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins

                  No builds found.