Modify ↓
Opened 4 months ago
Closed 4 months ago
#14352 closed defect (fixed)
TypeError raising with openpyxl 3.1.3+ when downloading *.xlsx file
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | ExcelDownloadPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.6 |
Description
Workaround is to downgrade openpyxl to 3.1.2.
====================================================================== ERROR: test_query (tracexceldownload.tests.ticket.Excel2007TicketTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jun66j5/src/exceldownloadplugin/1.0/tracexceldownload/tests/ticket.py", line 105, in test_query content, mimetype = mod.convert_content(req, self._mimetype, query, File "/home/jun66j5/src/exceldownloadplugin/1.0/tracexceldownload/ticket.py", line 169, in convert_content return self._convert_query(req, content) File "/home/jun66j5/src/exceldownloadplugin/1.0/tracexceldownload/ticket.py", line 184, in _convert_query return self._convert_query_db(db, req, query, sheet_query, File "/home/jun66j5/src/exceldownloadplugin/1.0/tracexceldownload/ticket.py", line 215, in _convert_query_db self._create_sheet_query(req, context, data, book) File "/home/jun66j5/src/exceldownloadplugin/1.0/tracexceldownload/ticket.py", line 314, in _create_sheet_query writer.set_col_widths() File "/home/jun66j5/src/exceldownloadplugin/1.0/tracexceldownload/api.py", line 432, in set_col_widths self.sheet.append(values) File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/worksheet/_write_only.py", line 120, in append self._rows.send(row) File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/worksheet/_write_only.py", line 72, in _write_rows self._writer.write_row(xf, row, row_idx) File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/worksheet/_writer.py", line 137, in write_row for cell in row: File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/worksheet/_write_only.py", line 133, in _values_to_row cell.value = value File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/cell/cell.py", line 218, in value self._bind_value(value) File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/cell/cell.py", line 187, in _bind_value raise ValueError("Cannot convert {0!r} to Excel".format(value)) File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/cell/cell.py", line 151, in __repr__ return "<Cell {0!r}.{1}>".format(self.parent.title, self.coordinate) File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/cell/cell.py", line 126, in coordinate col = get_column_letter(self.column) File "/dev/shm/tox/py310-trac16-pyxl315/lib/python3.10/site-packages/openpyxl/utils/cell.py", line 93, in get_column_letter if not 1 <= col_idx <= 18278: TypeError: '<=' not supported between instances of 'int' and 'str'
Attachments (0)
Note: See
TracTickets for help on using
tickets.
In 18652: