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

cmdLineFwk crashes when filling output collection

    Details

      Description

      stac crashes when it tries to add a DatasetRef to output collection:

      stac --clobber-config --clobber-versions -b ../ci_hsc/DATA/ -o test1 -i raw/HSC -p lsst.ip.isr --debug -L isr=debug -d "PhysicalFilter.physical_filter='HSC-I' AND Detector.detector=16 AND Exposure.exposure=903988" run -t IsrTask --show=graph
      TaskDef(lsst.ip.isr.isrTask.IsrTask, label=IsrTask)
        Quantum 0:
          inputs:
            raw: [DataId({'exposure': 903988, 'instrument': 'HSC', 'detector': '16'})]
          outputs:
            ISRG3PostIsrCcd: [DataId({'detector': 16, 'instrument': 'HSC', 'visit': 903988})]
      Traceback (most recent call last):
        File "/project/salnikov/gen3-middleware/pipe_supertask/bin/stac", line 25, in <module>
          sys.exit(CmdLineFwk().parseAndRun())
        File "/project/salnikov/gen3-middleware/pipe_supertask/python/lsst/pipe/supertask/cmdLineFwk.py", line 228, in parseAndRun
          return self.runPipeline(qgraph, butler, args)
        File "/project/salnikov/gen3-middleware/pipe_supertask/python/lsst/pipe/supertask/cmdLineFwk.py", line 334, in runPipeline
          self._updateOutputCollection(graph, butler)
        File "/project/salnikov/gen3-middleware/pipe_supertask/python/lsst/pipe/supertask/cmdLineFwk.py", line 412, in _updateOutputCollection
          registry.associate(collection, id2ref.values())
        File "/project/salnikov/gen3-middleware/daf_butler/python/lsst/daf/butler/core/utils.py", line 290, in inner
          return func(self, *args, **kwargs)
        File "/project/salnikov/gen3-middleware/daf_butler/python/lsst/daf/butler/registries/sqlRegistry.py", line 589, in associate
          ref = refs[0]
      TypeError: 'dict_values' object does not support indexing 

      Apparently in _updateOutputCollection() I'm passing dict.values() to an argument that is supposed to be a list.

        Attachments

          Issue Links

            Activity

            salnikov Andy Salnikov created issue -
            salnikov Andy Salnikov made changes -
            Field Original Value New Value
            Epic Link DM-14661 [ 106365 ]
            salnikov Andy Salnikov made changes -
            Link This issue is triggered by DM-16467 [ DM-16467 ]
            salnikov Andy Salnikov made changes -
            Description stac crashes when it tries to add a DatasetRef to output collection:
            {noformat}
            stac --clobber-config --clobber-versions -b ../ci_hsc/DATA/ -o test1 -i raw/HSC -p lsst.ip.isr --debug -L isr=debug -d "PhysicalFilter.physical_filter='HSC-I' AND Detector.detector=16 AND Exposure.exposure=903988" run -t IsrTask --show=graph
            TaskDef(lsst.ip.isr.isrTask.IsrTask, label=IsrTask)
              Quantum 0:
                inputs:
                  raw: [DataId({'exposure': 903988, 'instrument': 'HSC', 'detector': '16'})]
                outputs:
                  ISRG3PostIsrCcd: [DataId({'detector': 16, 'instrument': 'HSC', 'visit': 903988})]
            Traceback (most recent call last):
              File "/project/salnikov/gen3-middleware/pipe_supertask/bin/stac", line 25, in <module>
                sys.exit(CmdLineFwk().parseAndRun())
              File "/project/salnikov/gen3-middleware/pipe_supertask/python/lsst/pipe/supertask/cmdLineFwk.py", line 228, in parseAndRun
                return self.runPipeline(qgraph, butler, args)
              File "/project/salnikov/gen3-middleware/pipe_supertask/python/lsst/pipe/supertask/cmdLineFwk.py", line 334, in runPipeline
                self._updateOutputCollection(graph, butler)
              File "/project/salnikov/gen3-middleware/pipe_supertask/python/lsst/pipe/supertask/cmdLineFwk.py", line 412, in _updateOutputCollection
                registry.associate(collection, id2ref.values())
              File "/project/salnikov/gen3-middleware/daf_butler/python/lsst/daf/butler/core/utils.py", line 290, in inner
                return func(self, *args, **kwargs)
              File "/project/salnikov/gen3-middleware/daf_butler/python/lsst/daf/butler/registries/sqlRegistry.py", line 589, in associate
                ref = refs[0]
            TypeError: 'dict_values' object does not support indexing {noformat}
            Apparently in {{_updateOutputCollection()}} I'm passing dict.values() to an argument that is supposed to be a list.
            salnikov Andy Salnikov made changes -
            Watchers Andy Salnikov [ Andy Salnikov ] Vaikunth Thukral [ Vaikunth Thukral ]
            salnikov Andy Salnikov made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            salnikov Andy Salnikov made changes -
            Resolution Done [ 10000 ]
            Status In Progress [ 3 ] Done [ 10002 ]

              People

              • Assignee:
                salnikov Andy Salnikov
                Reporter:
                salnikov Andy Salnikov
                Watchers:
                Andy Salnikov, Vaikunth Thukral
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel