[PIPE2D-594] Confusing message from ingestPfsImages.py for already ingested files. Created: 02/Jun/20  Updated: 03/Jun/20  Resolved: 03/Jun/20

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: cloomis Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Reviewers: cloomis

 Description   

If a file has been ingested, the ingest.py super().runFile() returns None, when is then indexed to get the pfsConfig. That throws a TypeError which leaks out to a then puzzled human.

(Pdb) n
TypeError: 'NoneType' object is not subscriptable
> /software/devel/cpl/obs_pfs/python/lsst/obs/pfs/ingest.py(446)runFile()
-> self.ingestPfsConfig(pfsConfigDir, hduInfoList[0], args)
(Pdb) l
441  	        """
442  	        import pdb; pdb.set_trace()
443  	        try:
444  	            hduInfoList = super().runFile(infile, registry, args)
445  	            pfsConfigDir = args.pfsConfigDir if args.pfsConfigDir is not None else os.path.dirname(infile)
446  ->	            self.ingestPfsConfig(pfsConfigDir, hduInfoList[0], args)
447  	        except Exception:
448  	            import traceback
449  	            traceback.print_exc()
450  	            raise
451  	        return hduInfoList


 Comments   
Comment by price [ 03/Jun/20 ]

cloomis, would you please check that this fix works for you?

Changes are in tickets/PIPE2D-594 of obs_pfs.

Comment by price [ 03/Jun/20 ]

Merged to master.

Generated at Sat Feb 10 15:55:13 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.