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

internal error: Huge input lookup #22

Open
ponsfrilus opened this issue Nov 15, 2019 · 1 comment
Open

internal error: Huge input lookup #22

ponsfrilus opened this issue Nov 15, 2019 · 1 comment

Comments

@ponsfrilus
Copy link

Got this error trying to export layer of a big file (python2 ./svg-objects-export.py --xpath "//svg:g[@inkscape:groupmode='layer']" --extra '--export-area-page --export-id-only' ../dir/file.svg :

Inkscape 0.92.4 (5da689c313, 2019-01-14)
exporting from ../dir/file.svg all objects matching //svg:g[@inkscape:groupmode='layer']
Traceback (most recent call last):
  File "./svg-objects-export.py", line 238, in <module>
    intree = etree.parse(infile, parser)
  File "lxml.etree.pyx", line 3310, in lxml.etree.parse (src/lxml/lxml.etree.c:72517)
  File "parser.pxi", line 1791, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:105979)
  File "parser.pxi", line 1817, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:106278)
  File "parser.pxi", line 1721, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:105277)
  File "parser.pxi", line 1122, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:100227)
  File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:94350)
  File "parser.pxi", line 690, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:95786)
  File "parser.pxi", line 620, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:94853)
lxml.etree.XMLSyntaxError: internal error: Huge input lookup, line 479944, column 25

Thanks to https://stackoverflow.com/a/11850445/960623, it runs with adding huge_tree=True in the etree parser, line 237 (parser = etree.XMLParser(huge_tree=True).

Thanks for saving me the time to export all layer manually !

@berteh
Copy link
Owner

berteh commented Jul 16, 2020

thanks for the link and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants