Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

798
Views
python 3.5 -> 3.6 Tablib TypeError: cell() missing 1 required positional argument: 'column'

Migrating from python 3.5 to 3.6, my unit tests reveal a problem with django-import-export & tablib:

TypeError: cell() missing 1 required positional argument: 'column'

File "<path>/lib/python3.6/site-packages/tablib/formats/_xlsx.py", line 122, in dset_sheet
    cell = ws.cell('%s%s' % (col_idx, row_number))
    TypeError: cell() missing 1 required positional argument: 'column'

The line in tablib:

    cell = ws.cell('%s%s' % (col_idx, row_number))

So indeed, there is no argument for the column

My view code:

my_resource = MyModelResource(queryset=my_queryset)
dataset = my_resource.export()
response = HttpResponse(dataset.xlsx, content_type='application/vnd.ms-excel')

This works fine in python3.5 but fails under 3.6

requirements.txt:

...
tablib==0.12.1
django-import-export==0.7.0
Django==1.11.7
...
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!