The case of no injections in config.yml is not handled gracefully.
While setting up a CIT-small analysis, I ran across this when running make dag
:
das-pcdev4:~/online-analysis/foo-online> singularity exec -B $TMPDIR /cvmfs/singularity.opensciencegrid.org/lscsoft/gstlal:master make dag
gstlal_ll_inspiral_workflow -c config.yml --workflow inspiral
Traceback (most recent call last):
File "/usr/bin/gstlal_ll_inspiral_workflow", line 67, in <module>
dag.marginalize_online(marg_pdf)
File "/usr/lib64/python3.6/site-packages/gstlal/dags/__init__.py", line 121, in wrapped
return func(self.config, self, *args, **kwargs)
File "/usr/lib64/python3.6/site-packages/gstlal/dags/layers/inspiral.py", line 1589, in marginalize_online_layer
inputs.extend(f"{int(svd_bin):04d}_inj_{injname}_registry.txt" for (svd_bin, injname) in itertools.product(config.svd.bins, config.filter.injections.keys()))
AttributeError: 'NoneType' object has no attribute 'keys'
make: *** [online_inspiral_dag.dag] Error 1
I was able to work around it by adding injections: {}
to the filter section of config.yml
but I think that the code should handle config.filter.injections == None
or the config file parsing should fail if ``config.filter.injections == None`.