diff --git a/app/server/utils.py b/app/server/utils.py index 38055ef4..439cc870 100644 --- a/app/server/utils.py +++ b/app/server/utils.py @@ -344,7 +344,7 @@ class PlainTextParser(FileParser): while True: batch = list(itertools.islice(file, IMPORT_BATCH_SIZE)) if not batch: - raise StopIteration + break yield [{'text': line.strip()} for line in batch]