diff --git a/CHANGELOG.md b/CHANGELOG.md index d93a61244fb6dc8aa4b4c27b3a444deea8ea900d..d5f047b7d92e01a79a8879519f9ee1501bde5a26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - When using the `parameters\_file` option, the indices of the models now correspond to the line number of the input file. (Médéric Boquien) - When using the `parameters\_file` option, the list of modules is read from `sed\_modules` rather than being inferred from the input file. (Médéric Boquien) - The computation of the upper limits would only work for the first few models, reverting back to regular fits for the others. (Médéric Boquien) +- A more explicit message is now given when the flux table cannot be read properly. (Médéric Boquien) ### Optimised - The cache architecture has been simplified, making it somewhat faster. It speeds up the model generation by ~1%. (Médéric Boquien) diff --git a/pcigale/session/configuration.py b/pcigale/session/configuration.py index c53257fb1a37071225bebde4125a81853b919e1f..5236d8ae14b54372e41058e9d0ce8cb1723fb2a9 100644 --- a/pcigale/session/configuration.py +++ b/pcigale/session/configuration.py @@ -137,8 +137,12 @@ class Configuration(object): if self.config['data_file'] != '': obs_table = read_table(self.config['data_file']) - # Check that the id and redshift columns are present in the input - # file + # Check that the the file was correctly read and that the id and + # redshift columns are present in the input file + if 'col1' in obs_table.columns: + raise Exception("The input could not be read properly. Verify " + "its format and that it does not have two " + "columns with the same name.") if 'id' not in obs_table.columns: raise Exception("Column id not present in input file") if 'redshift' not in obs_table.columns: