Skip to content

Double deletion due to redundant mark_as_processed calls #13

@subhk

Description

@subhk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions