diff --git a/src/caosadvancedtools/scifolder/withreadme.py b/src/caosadvancedtools/scifolder/withreadme.py index c36fb736c399724fe62e5f95dfa08b4bfe1a0f81..8a63e1f6d90ed4e78d01f76393cc72982cdc79d4 100644 --- a/src/caosadvancedtools/scifolder/withreadme.py +++ b/src/caosadvancedtools/scifolder/withreadme.py @@ -261,10 +261,17 @@ class WithREADME(object): for item in self.header[field.key]: if INCLUDE.key in item: - included.extend( - get_entity_ids_from_include_file( - os.path.dirname(self.crawled_path), - item[INCLUDE.key])) + try: + included.extend( + get_entity_ids_from_include_file( + os.path.dirname(self.crawled_path), + item[INCLUDE.key])) + except ValueError: + al = logging.getLogger("caosadvancedtools") + al.warning("The include file cannot be read. Please " + "make sure, it contains an 'ID' column." + " The file is ignored." + "\n{}".format(item[INCLUDE.key])) assure_object_is_in_list(included, record,