[Solved]-Python 3.5 -> 3.6 Tablib TypeError: cell() missing 1 required positional argument: 'column'

34👍

This has nothing to do with Python 3.5 or 3.6. You have a newer openpyxl version installed with your 3.6 installation compared to your 3.5 setup.

The version you have installed with 3.6 has removed the deprecated coordinate parameter from worksheet.cell() method and made the row and column mandatory arguments. This is part of version 2.5.0b1, released on 2018-01-19 (two weeks ago):

Major Changes

worksheet.cell() no longer accepts a coordinate parameter. The syntax is now ws.cell(row, column, value=None)

The tablib library has not yet adjusted to this change. The code should just pass in the column and row numbers directly:

cell = ws.cell(row=row_number, column=col_idx)

Using keyword arguments would ensure compatibility all the way back to 1.1.0 (the release that added support for the column and row parameters, released in 2010).

In the meantime, you can downgrade your openpyxl installation to version 2.4.9, the last release without those changes.

Also see issue #324 in the tablib project repository.

Leave a comment