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

Fix TypeError: cannot unpack non-iterable PDFObjRef object, when unpacking the value of 'DW2' #529

Conversation

EucliTs0
Copy link

@EucliTs0 EucliTs0 commented Oct 21, 2020

An error is occured when the 'DW2' key contains a PDFObjRef object instead of a list of int values, e.g: 'DW2': PDFObjRef:152.
To solve this issue, we utilise the resolve1() function

See: #518

Pull request

Thanks for improving pdfminer.six! Please include the following information to
help us discuss and merge this PR:

  • A description of why this PR is needed. What does it fix? What does it
    improve?
  • A summary of the things that this PR changes.
  • Reference the issues that this PR fixes (use the fixes #(issue nr) syntax).
    If this PR does not fix any issue, create the issue first and mention that
    you are willing to work on it.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Include an example pdf if you have one.

Checklist

  • 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 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

…cking the value of 'DW2'

An error is occured when the 'DW2' key contains a PDFObjRef object instead of a list of int values, e.g: 'DW2': <PDFObjRef:152>.
To solve this issue, we utilise the resolve1() function

See: pdfminer#518
@pietermarsman
Copy link
Member

Thanks! Could you go over the checklist? E.g. add a line to the changleog.

@EucliTs0
Copy link
Author

Thanks! Could you go over the checklist? E.g. add a line to the changleog.

Sure, done!

@pietermarsman
Copy link
Member

Assuming the cicd error will be fixed because I reverted the change that caused the error #534

@pietermarsman pietermarsman merged commit fc75972 into pdfminer:develop Oct 25, 2020
@pietermarsman
Copy link
Member

@EucliTs0 Thanks!

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