diff --git a/unwind/imdb_import.py b/unwind/imdb_import.py index bccb18a..705db2f 100644 --- a/unwind/imdb_import.py +++ b/unwind/imdb_import.py @@ -198,7 +198,9 @@ async def import_from_file(*, basics_path: Path, ratings_path: Path): log.info("💾 Importing movies ...") total = count_lines(basics_path) - assert total != 0 + log.debug("Found %i movies.", total) + if total == 0: + raise RuntimeError(f"No movies found.") perc_next_report = 0.0 perc_step = 0.1