You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have downloaded the folder including your last update, run an extraction from a pdf and I get back the following errors:
File "/Users/.../pdfannots.py", line 10, in <module>
sys.exit(main())
File "/Users/.../pdfannots/cli.py", line 141, in main
doc = process_file(
File "/Users/.../pdfannots/__init__.py", line 448, in process_file
annot = _mkannotation(pa.resolve(), page)
File "/Users/.../pdfannots/__init__.py", line 46, in _mkannotation
subtype = pa.get('Subtype')
AttributeError: 'NoneType' object has no attribute 'get'
The call function used is: python3 pdfannots.py "file_2017.pdf" -o notes.md --print-filename -p
The md output is blank.
@Chris-mik this looks like a partly malformed PDF -- there's an entry in the page's Annots structure that does not refer to a valid object. I can change the code to ignore such entries, but would like to have a test case to check with. Are you able to share the PDF? If not, perhaps you could try to recreate the issue on a different PDF using the same annotation software?
Tentative fix for issue #42
Also:
* use PSLiteral in ANNOT_SUBTYPES rather than hashing the same name strings
* improve typing of _mkannotation, and placate mypy
@Chris-mik, I hope the above-referenced commit fixed this crash, but would still appreciate if you could confirm that, and even better if you could share a PDF that demonstrates the issue. In the meantime, I'll close this.
I have downloaded the folder including your last update, run an extraction from a pdf and I get back the following errors:
The call function used is: python3 pdfannots.py "file_2017.pdf" -o notes.md --print-filename -p
The md output is blank.
Originally posted by @Chris-mik in #41 (comment)
The text was updated successfully, but these errors were encountered: