dnanexus/dx-toolkit

dx find jobs: KeyError: 'stoppedRunning'

lfearnley opened this issue · 1 comments

Hi all,

I'm encountering some issues related to missing dictionary keys when running dx find jobs in dxpy:

(dxpy) [fearnley.l@med-n25 ukb_cloud]$ dx --version
dx v0.327.1
(dxpy) [fearnley.l@med-n25 ukb_cloud]$ dx find jobs --state failed -n 1000 --created-after 2d
* retools (re-run) (retools:main) (failed) job-GG2bvf8JPYJV33QY88fjypkb
  fearnleyl_bl 2022-08-24 09:10:17 (runtime 0:17:28)
Traceback (most recent call last):
  File "/stornext/HPCScratch/home/fearnley.l/miniconda3/envs/dxpy/lib/python3.9/site-packages/dxpy/scripts/dx.py",
 line 2248, in find_executions
    process_tree(descriptions[roots[root]], executions_by_parent, descriptions)
  File "/stornext/HPCScratch/home/fearnley.l/miniconda3/envs/dxpy/lib/python3.9/site-packages/dxpy/scripts/dx.py",
 line 2164, in process_tree
    tree, root = build_tree(result['id'], executions_by_parent, execution_descriptions, is_cached_result)
  File "/stornext/HPCScratch/home/fearnley.l/miniconda3/envs/dxpy/lib/python3.9/site-packages/dxpy/scripts/dx.py",
 line 2145, in build_tree
    root_string = get_find_executions_string(execution_descriptions[root],
  File "/stornext/HPCScratch/home/fearnley.l/miniconda3/envs/dxpy/lib/python3.9/site-packages/dxpy/utils/describe.
py", line 1154, in get_find_executions_string
    runtime = datetime.timedelta(seconds=int(desc['stoppedRunning']-desc['startedRunning'])//1000)
KeyError: 'stoppedRunning'