diff --git a/node_normalizer/loader.py b/node_normalizer/loader.py index 3f518b2..43d48c8 100644 --- a/node_normalizer/loader.py +++ b/node_normalizer/loader.py @@ -526,6 +526,9 @@ async def load_compendium(self, compendium_filename: str, block_size: int) -> bo logger.info(f"{line_counter} {compendium_filename} total lines processed") + if line_counter == 0: + raise RuntimeError(f"Compendium file {compendium_filename} is empty.") + print(f"Done loading {compendium_filename}...") except Exception as e: logger.error(f"Exception thrown in load_compendium({compendium_filename}), line {line_counter}: {e}")