Skip to content

Fix exception error message #335

@wajdikhattel

Description

@wajdikhattel

Describe the bug
When you don't have one of the dependencies of the parsers installed, you will get the ExtensionNotSupported exception even though the extension exists.
Example (#333): with .pptx and not having the package Image:

ExtensionNotSupported: The filename extension .pptx is not yet supported by
textract. Please suggest this filename extension here:

https://github.com/deanmalmgren/textract/issues
Available extensions include: .csv, .doc, .docx, .eml, .epub, .gif, .htm, .html, .jpeg, .jpg, .json, .log, .mp3, .msg, .odt, .ogg, .pdf, .png, .pptx, .ps, .psv, .rtf, .tff, .tif, .tiff, .tsv, .txt, .wav, .xls, .xlsx

To Reproduce

  1. Use a supported extension (.pptx for example)
  2. Have one of the dependencies of that extension's parser not installed (Image for example)
  3. Run the textract.process(...) function
  4. See the error telling you that the extension is not supported

Expected behavior
An error saying that you need to install the missing dependency.

Desktop (please complete the following information):

  • OS: [e.g. Windows 10] Manjaro Linux 20.0.1
  • Textract version [e.g. 1.6.3] 1.6.3
  • Python version [e.g. 3.7] 3.6
  • Virtual environment (yes/no) yes

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