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

Registry.queryCollections raises MissingCollectionError

    XMLWordPrintable

Details

    • Bug
    • Status: To Do
    • Resolution: Unresolved
    • None
    • daf_butler
    • None
    • Data Release Production
    • 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

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

              Dates

                Created:
                Updated:

                Jenkins

                  No builds found.