art-daq / artdaq

Other
0 stars 3 forks source link

Improve the error reporting from conftool.py #103

Closed eflumerf closed 2 years ago

eflumerf commented 2 years ago

This issue has been migrated from https://cdcvs.fnal.gov/redmine/issues/20632 (FNAL account required) Originally created by @bieryAtFnal on 2018-08-17 16:42:56


Here is a Slack posting from one of our protoDUNE DAQ collaborators:

the new fake configuration are now throwing an error when exported
why I have no clue
it is
np04_WibsFake_Ssps00041
it you want to try
no error in the import
export fails

```Traceback (most recent call last):
  File "/nfs/sw/artdaq/products/artdaq_database/v1_04_54/slf7.x86_64.e14.s50.prof/bin/conftool.py", line 610, in 
    result = thefunc(*sys.argv[2:len(args[0]) + 2]) if args else thefunc()
  File "/nfs/sw/artdaq/products/artdaq_database/v1_04_54/slf7.x86_64.e14.s50.prof/bin/conftool.py", line 393, in exportConfiguration
    return __exportConfiguration(config)
  File "/nfs/sw/artdaq/products/artdaq_database/v1_04_54/slf7.x86_64.e14.s50.prof/bin/conftool.py", line 327, in __exportConfiguration
    path = cfg[collection] if cfg[collection] in include_dirs else __get_prefix(config)
IndexError: tuple index out of range```

This (and other) errors should do a better job of explaining what went wrong.