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

Two minor changes #610

Merged
merged 9 commits into from
Aug 31, 2021
Merged

Two minor changes #610

merged 9 commits into from
Aug 31, 2021

Conversation

Artoria2e5
Copy link

@Artoria2e5 Artoria2e5 commented Apr 24, 2021

This PR fixes two very minor headaches I had when playing with pdf2txt.py.

  • A wrong -t value produces a cryptic message. Now it raises a proper ValueError.
  • Asking for -t tag produces a runtime error. Now it runs correctly (as in, it successfully produces incomprehensible garbage that hasn't been run through layout analysis:))

Checklist

  • I have added tests that prove my fix is effective or that my feature
    works
    • Do I really want to test that Tag thing? Do I? Please don't hurt me
  • I have updated the README.md or I am verified that this
    is not necessary
  • I have updated the readthedocs documentation or I
    verified that this is not necessary
  • I have added a consice human-readable description of the change to
    CHANGELOG.md

@Artoria2e5
Copy link
Author

Artoria2e5 commented Apr 24, 2021

Looks like I am being attacked for the f-string by an outdated flake8 or something. (I will fix the whitespace ASAP, but I am currently in a bit of rebase hell of my own making.)

@pietermarsman
Copy link
Member

I can see why the UnboundLocalError is not very helpful.

I can also reproduce the TypeError when extracting tags.

Will cleanup both a bit before merging.

@pietermarsman pietermarsman merged commit 46fa214 into pdfminer:develop Aug 31, 2021
@pietermarsman
Copy link
Member

@Artoria2e5 Thanks for noticing and fixing

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.

2 participants