"Python int too large" while parsing invalid date
I get the error Python int too large to convert to C int
at line 122 of utils/datetime.py
(the from_excel
function) for the latest release on PyPI.
This is because I have a cell with a large number that is marked as a date in the excel document (unintentionally - it is not a date). The number is much larger than a 64-bit int and was intended to be interpreted as text.
To reproduce:
- Create spreadsheet with value
3186301001005
in cell A1. - Set number format for that cell to date. Excel will show just
########
in the cell. Save the workbook. - Call
load_workbook
on the resulting file. Should give you the error mentioned above.
It looks like this issue has popped up a few times before in #841 (closed), #388 (closed), and #180 (closed).