# inspect_job.py crashes on empty Job

XMLWordPrintable

## Details

• Type: Bug
• Status: To Do
• Resolution: Unresolved
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
2
• Team:

## Description

Running inspect_job.py on a Job file that doesn't contain any metric values gives the following error:

 Traceback (most recent call last):  File "/scratch/krzys001/verify/bin/inspect_job.py", line 28, in   main()  File "/scratch/krzys001/verify/python/lsst/verify/bin/inspectjob.py", line 143, in main  inspect_job(job)  File "/scratch/krzys001/verify/python/lsst/verify/bin/inspectjob.py", line 91, in inspect_job  max_metric_length = max([len(str(metric)) for metric in job.measurements]) ValueError: max() arg is an empty sequence 

Reorganize the code so that max_metric_length is not calculated in this case. It may be helpful to distinguish the case where there are no metric values but there are Job-level metadata from the case where neither is present.

## Activity

There are no comments yet on this issue.

## People

• Assignee:
Krzysztof Findeisen
Reporter:
Krzysztof Findeisen
Watchers:
Krzysztof Findeisen