Ticket #267 (closed defect: fixed)

Opened 12 years ago

Last modified 7 years ago

inputoutputfits example fails with "IndexError: pop from empty list

Reported by: rowen Owned by: daues
Priority: blocker Milestone:
Component: pex_harness Keywords:
Cc: Blocked By:
Blocking: Project: LSST
Version Number: 3550
How to repeat:

Run the inputoutputfits example. if it fails complaining about the host then edit nodelist.scr to have the address of your machine or a machine you can reach.

Description

Running the inputoutputfits example (after fixing the nodelist.scr and input policy, though the latter makes no difference) fails with

Python Pipeline handleEvents - Sending event to Slices.

Python Pipeline populateClipboard
Traceback (most recent call last):
  File "/astro/users/rowen/code/dpstrunk/bin/runPipeline.py", line 36, in <module>
    pyPipeline.startStagesLoop()
  File "/astro/users/rowen/code/dpstrunk/python/lsst/dps/Pipeline.py", line 178, in startStagesLoop
    self.handleEvents(iStage)
  File "/astro/users/rowen/code/dpstrunk/python/lsst/dps/Pipeline.py", line 235, in handleEvents
    self.populateClipboard(inputParamPropertyPtrType, iStage, thisTopic)
  File "/astro/users/rowen/code/dpstrunk/python/lsst/dps/Pipeline.py", line 249, in populateClipboard
    clipboard = queue.getNextDataset()
  File "/astro/users/rowen/code/dpstrunk/python/lsst/dps/Queue.py", line 36, in getNextDataset
    clipboard = self.datasetList.pop(0)
IndexError: pop from empty list
Python Pipeline being deleted

I also see this in imageproc's imageCopyPipeline example.

Change History

comment:1 Changed 11 years ago by daues

  • Status changed from new to assigned

Accept ticket

comment:2 Changed 11 years ago by robyn

  • Milestone changed from DC2 Integration to DC3 MW Pipeline Harness Extensions

comment:3 Changed 10 years ago by daues

  • Status changed from assigned to closed
  • Component changed from dps to pex_harness
  • Resolution set to fixed
  • reviewstatus changed from notReady to notReviewed

The two functions of Queue.py for retrieving Clipboards are:

    def getNextDataset(self):
        """
        Return the Clipboard at the top of the dataset list, removing 
        the Clipboard from the dataset list in the process (pop).
        This method comprises the InputQueue interface
        """

    def element(self):
        """
        Return the Clipboard at the top of the dataset list, but do not remove 
        the Clipboard from the dataset list
        """

Both of these functions have been coded defensively to no longer pop off of or refer to an element of an empty list. If the queue/list of Clipboards is empty, then these functions return None . The decision to throw an exception or to take an alternative path (call a Clipboard constructor) is left to the external calling code.

comment:4 Changed 7 years ago by robyn

  • Milestone DC3b MW Pipeline Harness Extensions deleted

Milestone DC3b MW Pipeline Harness Extensions deleted

Note: See TracTickets for help on using tickets.