Saving this workbook fails
Created originally on Bitbucket by Emery Berger (emery@cs.umass.edu)
Opening this sheet as not read-only and saving it fails reliably. Worked with a previous version.
#!python
import openpyxl
fname = "sheets/subjects_xlsx/01sumdat.xlsx"
outname = "testme.xlsx"
workbook = openpyxl.load_workbook(filename=fname, read_only=False)
workbook.save(outname)
#!python
$ python repro.py
Traceback (most recent call last):
File "repro.py", line 7, in <module>
workbook.save(outname)
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/workbook/workbook.py", line 396, in save
save_workbook(self, filename)
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/writer/excel.py", line 294, in save_workbook
writer.save()
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/writer/excel.py", line 276, in save
self.write_data()
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/writer/excel.py", line 76, in write_data
self._write_worksheets()
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/writer/excel.py", line 216, in _write_worksheets
self.write_worksheet(ws)
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/writer/excel.py", line 201, in write_worksheet
writer.write()
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/worksheet/_writer.py", line 357, in write
self.write_tail()
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/worksheet/_writer.py", line 345, in write_tail
self.write_breaks()
File "/Users/emery/anaconda3/lib/python3.7/site-packages/openpyxl/worksheet/_writer.py", line 241, in write_breaks
self.xf.send(brk.to_tree())
AttributeError: 'tuple' object has no attribute 'to_tree'
My code (not this piece) is now failing on 16 other spreadsheets it previously worked on, and I suspect the problem is the same.
Attachments: 01sumdat.xlsx