openpyxl icon indicating copy to clipboard operation
openpyxl copied to clipboard

Issue "internal error: Huge input lookup"

Open hector-rojas-sci opened this issue 2 years ago • 0 comments

I'm working in a python script to create reports based on a specific Excel template, but when I execute my script I get the following error:

File "/usr/lib/python3/dist-packages/openpyxl/reader/excel.py", line 314, in load_workbook
    reader.read()
  File "/usr/lib/python3/dist-packages/openpyxl/reader/excel.py", line 279, in read
    self.read_worksheets()
  File "/usr/lib/python3/dist-packages/openpyxl/reader/excel.py", line 266, in read_worksheets
    pivot.cache = self.parser.pivot_caches[pivot.cacheId]
  File "/usr/lib/python3/dist-packages/openpyxl/reader/workbook.py", line 123, in pivot_caches
    records = get_rel(self.archive, cache.deps, cache.id, RecordList)
  File "/usr/lib/python3/dist-packages/openpyxl/packaging/relationship.py", line 167, in get_rel
    tree = fromstring(src)
  File "src/lxml/etree.pyx", line 3237, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1896, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1784, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1141, in lxml.etree._BaseParser._parseDoc
  File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
  File "<string>", line 2
lxml.etree.XMLSyntaxError: internal error: Huge input lookup, line 2, column 19801578

This error doesn't appear in Windows, but I need to my script running on Linux.

I was researching about the error message, I found the solution in lxml but I couldn't find something about openpyxl, also I reviewed my Excel Template which it is almost empty, also I increased the kali memory space, but I get the same result.

hector-rojas-sci avatar Apr 20 '22 18:04 hector-rojas-sci