Describe the issue
JSONLinesFileReader.read_file() parses every line returned by text.splitlines() with json.loads(line). If a .jsonl file contains an accidental blank or whitespace-only line between valid records, json.loads("") raises JSONDecodeError.
That exception bubbles up to InputReader._iterate_files(), where the reader catches the file-level exception, logs a warning, and skips the entire file. As a result, valid records before and after the blank line are not loaded.
Steps to reproduce
Create a JSONL input file:
{"text":"a"}
{"text":"b"}
Load it through the JSONL input reader.
Expected behavior
The blank or whitespace-only line is ignored and the two valid JSONL records are loaded.
Actual behavior
The blank line raises JSONDecodeError, and the parent input reader skips the whole file.
Additional context
This is a small parser robustness issue. It does not change handling for malformed non-empty JSONL lines.
A proposed fix is available in #2423.
Describe the issue
JSONLinesFileReader.read_file()parses every line returned bytext.splitlines()withjson.loads(line). If a.jsonlfile contains an accidental blank or whitespace-only line between valid records,json.loads("")raisesJSONDecodeError.That exception bubbles up to
InputReader._iterate_files(), where the reader catches the file-level exception, logs a warning, and skips the entire file. As a result, valid records before and after the blank line are not loaded.Steps to reproduce
Create a JSONL input file:
{"text":"a"} {"text":"b"}Load it through the JSONL input reader.
Expected behavior
The blank or whitespace-only line is ignored and the two valid JSONL records are loaded.
Actual behavior
The blank line raises
JSONDecodeError, and the parent input reader skips the whole file.Additional context
This is a small parser robustness issue. It does not change handling for malformed non-empty JSONL lines.
A proposed fix is available in #2423.