Unable to save file from workbook based on file that contains colored tabs
Created originally on Bitbucket by mperreux (Michael Perreux)
Reproducing the issue:
Create xlsx with colored tabs save as hello.xlsx.
Run following code:
#!python
from openpyxl import load_workbook
wb = load_workbook("hello.xlsx")
wb.save("hello2.xlsx")
#!python
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/xml/etree/ElementTree.py", line 1081, in _escape_attrib
if "&" in text:
TypeError: argument of type 'int' is not iterable
During handling of the above exception, another exception occurred:
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/xml/etree/ElementTree.py", line 1059, in _raise_serialization_error
"cannot serialize %r (type %s)" % (text, type(text).__name__)
TypeError: cannot serialize 7 (type int)
Attachments: color_bug.xlsxcolor_bug_screen.xlsx