Files: preprocessing/preprocessing.py:141, 213, 217
sv_to_jpg() calls mark_as_processed(file) internally upon successful frequency processing (line 141).
The calling function process_file() then calls mark_as_processed(file) again (lines 213, 217). The second call attempts file.unlink() on an already-deleted path. This raises a FileNotFoundError that is caught by the broad except Exception handler at line 166, producing a spurious error log entry for every successfully processed file - masking real errors in the log output.
The authors must ensure mark_as_processed is called exactly once per file, at a single well-defined point in the processing flow.
Ref: openjournals/joss-reviews#9240
Files: preprocessing/preprocessing.py:141, 213, 217
sv_to_jpg() calls mark_as_processed(file) internally upon successful frequency processing (line 141).
The calling function process_file() then calls mark_as_processed(file) again (lines 213, 217). The second call attempts file.unlink() on an already-deleted path. This raises a FileNotFoundError that is caught by the broad except Exception handler at line 166, producing a spurious error log entry for every successfully processed file - masking real errors in the log output.
The authors must ensure mark_as_processed is called exactly once per file, at a single well-defined point in the processing flow.
Ref: openjournals/joss-reviews#9240