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

ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters #71

Open
vikotse opened this issue Nov 14, 2018 · 1 comment

Comments

@vikotse
Copy link

vikotse commented Nov 14, 2018

environment:
pdfquery=0.4.3
python=2.7.15

I use pdfquery to load this pdf, and encounter an error.

error information as follows:
pdf.load()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pdfquery/pdfquery.py", line 385, in load
self.tree = self.get_tree(*_flatten(page_numbers))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pdfquery/pdfquery.py", line 487, in get_tree
for n, page in pages:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pdfquery/pdfquery.py", line 608, in
return (self.get_layout(page) for page in self._cached_pages())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pdfquery/pdfquery.py", line 603, in get_layout
layout = self._add_annots(layout, page.annots)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pdfquery/pdfquery.py", line 655, in _add_annots
elem = parser.makeelement('Annot', annot)
File "src/lxml/parser.pxi", line 1004, in lxml.etree._BaseParser.makeelement
File "src/lxml/apihelpers.pxi", line 131, in lxml.etree._makeElement
File "src/lxml/apihelpers.pxi", line 119, in lxml.etree._makeElement
File "src/lxml/apihelpers.pxi", line 300, in lxml.etree._initNodeAttributes
File "src/lxml/apihelpers.pxi", line 311, in lxml.etree._addAttributeToNode
File "src/lxml/apihelpers.pxi", line 1439, in lxml.etree._utf8
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

@tsuga
Copy link

tsuga commented May 23, 2019

I'm having the same issue. Any update?

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

No branches or pull requests

2 participants