Skip to content

translate_header gracious error code on missing run

 __  ___  __       _______.   .___________.  ______     ______    __          _______.
|  |/  / |  |     /       |   |           | /  __  \   /  __  \  |  |        /       |
|  '  /  |  |    |   (----`   `---|  |----`|  |  |  | |  |  |  | |  |       |   (----`
|    <   |  |     \   \           |  |     |  |  |  | |  |  |  | |  |        \   \    
|  .  \  |  | .----)   |          |  |     |  `--'  | |  `--'  | |  `----.----)   |   
|__|\__\ |__| |_______/           |__|      \______/   \______/  |_______|_______/    

Traceback (most recent call last):
  File "/usr/local/bin/gris_translate_header", line 9, in <module>
    run_translate_header(sys.argv[1:])
  File "/usr/local/lib/python3.8/site-packages/kis_tools/gris/headers/translate_header.py", line 307, in run_translate_header
    files = groupby_gris_run(files)[args.run]
KeyError: 2

If translate header is called with a non-existent run, the tool should exit graciously. Same goes for the splitter tool

Edited by Carl Schaffer