SerialisationError: unknown error

Issue #1046 resolved
Norbert Kwizera created an issue

Unable to save workbook with 500.000+ rows, I am using the WriteOnly mode

And I get "SerialisationError: unknown error -1300873846"

below is the stacktrace of the error

   self.workbook.save(self.file.name)
  File "openpyxl/workbook/workbook.py", line 365, in save
    save_dump(self, filename)
  File "openpyxl/writer/excel.py", line 313, in save_dump
    writer.save(filename)
  File "openpyxl/writer/excel.py", line 266, in save
    self.write_data()
  File "openpyxl/writer/excel.py", line 83, in write_data
    self._write_worksheets()
  File "openpyxl/writer/excel.py", line 203, in _write_worksheets
    xml = ws._write()
  File "openpyxl/worksheet/write_only.py", line 259, in _write
    self.close()
  File "openpyxl/worksheet/write_only.py", line 217, in close
    self.writer.close()
  File "openpyxl/worksheet/write_only.py", line 209, in _write_header
    xf.write(xml)
  File "src/lxml/serializer.pxi", line 921, in lxml.etree.xmlfile.__exit__ (src/lxml/lxml.etree.c:141912)
  File "src/lxml/serializer.pxi", line 1227, in lxml.etree._IncrementalFileWriter._close (src/lxml/lxml.etree.c:146775)
  File "src/lxml/serializer.pxi", line 1233, in lxml.etree._IncrementalFileWriter._handle_error (src/lxml/lxml.etree.c:146873)
  File "src/lxml/serializer.pxi", line 195, in lxml.etree._raiseSerialisationError (src/lxml/lxml.etree.c:133939)

Comments (5)

  1. CharlieC

    I think that this is an lxml error that really needs addressing there, preferably with a stripped down test case with as little openpyxl as possible. I think I've seen something similar myself.

  2. Log in to comment