Skip to content

Inconsistent handling of failures when extracting text from different formats #39

Open

Description

@martinburchell

If document_to_text() is applied to a password-protected PDF, we ignore the non-zero return code from pdftotext and return empty text. If the same function is applied to a password-protected docx file, we raise an exception.

Given that we handle exceptions from document_to_text() in CRATE, I think we should not ignore non-zero return codes from external tools and raise an exception instead. We could also create a specific text extraction exception to handle all failures of this kind.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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