Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise more specific error if Pillow cannot be imported #714

Merged
merged 5 commits into from
Feb 22, 2022

Conversation

pietermarsman
Copy link
Member

Pull request

Fix #701

How Has This Been Tested?

Extracting images without PIL installed and seeing the error message.

Checklist

  • I have formatted my code with black.
  • I have added tests that prove my fix is effective or that my feature
    works
  • I have added docstrings to newly created methods and classes
  • I have optimized the code at least one time after creating the initial
    version
  • I have updated the README.md or verified that this
    is not necessary
  • I have updated the readthedocs documentation or
    verified that this is not necessary
  • I have added a concise human-readable description of the change to
    CHANGELOG.md

@pietermarsman pietermarsman changed the title Raise specific warning if Pillow cannot be imported Raise more specific error if Pillow cannot be imported Feb 12, 2022
Copy link
Member

@jstockwin jstockwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one type in the error message (you don't close the backticks)

pdfminer/image.py Outdated Show resolved Hide resolved
Co-authored-by: Jake Stockwin <jstockwin@gmail.com>
@pietermarsman pietermarsman merged commit 121235e into develop Feb 22, 2022
@pietermarsman pietermarsman deleted the add-pillow-dependency branch February 22, 2022 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add extras_require in setup.py for PIL, and raise error if not installed when needing PIL
2 participants