question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

meet error when export to xlsx file

See original GitHub issue

I just met such a problem when Im trying to export data to xlsx files: The error is :

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

and Im using sentry to capture the bug,it shows like this:

The raw:


TypeError: cell() missing 1 required positional argument: 'column'
  File "django\core\handlers\exception.py", line 41, in inner
    response = get_response(request)
  File "django\core\handlers\base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "django\core\handlers\base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "xadmin\sites.py", line 302, in wrapper
    return self.admin_view(view, cacheable)(*args, **kwargs)
  File "django\views\decorators\cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "xadmin\sites.py", line 209, in inner
    return view(request, *args, **kwargs)
  File "xadmin\views\base.py", line 280, in view
    return handler(request, *args, **kwargs)
  File "django\utils\decorators.py", line 67, in _wrapper
    return bound_func(*args, **kwargs)
  File "django\utils\decorators.py", line 149, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "django\utils\decorators.py", line 63, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "xadmin\views\base.py", line 78, in method
    return filter_chain(filters, len(filters) - 1, _inner_method, *args, **kwargs)
  File "xadmin\views\base.py", line 47, in filter_chain
    return func()
  File "xadmin\views\base.py", line 72, in _inner_method
    return func(self, *args, **kwargs)
  File "xadmin\views\list.py", line 409, in get
    response = self.get_response(context, *args, **kwargs)
  File "xadmin\views\base.py", line 78, in method
    return filter_chain(filters, len(filters) - 1, _inner_method, *args, **kwargs)
  File "xadmin\views\base.py", line 61, in filter_chain
    return filter_chain(filters, token - 1, _inner_method, *args, **kwargs)
  File "xadmin\views\base.py", line 47, in filter_chain
    return func()
  File "xadmin\views\base.py", line 60, in _inner_method
    return fm(func if fargs[1] == '__' else func(), *args, **kwargs)
  File "xadmin\plugins\importexport.py", line 444, in get_response
    export_data = self.get_export_data(file_format, queryset, request=self.request)
  File "xadmin\plugins\importexport.py", line 398, in get_export_data
    export_data = file_format.export_data(data)
  File "import_export\formats\base_formats.py", line 109, in export_data
    return self.get_format().export_set(dataset, **kwargs)
  File "tablib\formats\_xlsx.py", line 43, in export_set
    dset_sheet(dataset, ws, freeze_panes=freeze_panes)
  File "tablib\formats\_xlsx.py", line 122, in dset_sheet
    cell = ws.cell('%s%s' % (col_idx, row_number))

The applications:

import exporterror


My enviroment is like this :

corsheaders 1.3.1
crispy_forms 1.7.0
django 1.11.4
django_filters 1.1.0
django_tables2 1.21.1
import_export 1.0.0
oauth2_provider 1.0.0
python 3.6.3
raven 6.6.0
rest_framework 3.7.7
reversion 0.2
xadmin 0.6.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
giovannicadizcommented, Dec 11, 2018

@andrewgy8 thank you very much, you saved my life 👍

1reaction
andrewgy8commented, Jul 6, 2018

@soulrenger I’m not sure if this issue should be closed. It is still breaking in the latest version 1.0.1

Perhaps we should pin openpyxl to 2.4.9 as mentioned here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

We found a problem with some content .xlsx error. Then> The ...
After downloading an .xlsx file from the web and trying to open it with Excel 2016 (and 2013), I am experiencing an error...
Read more >
Sage 50 Won't Export To Excel - AccountsPro
Primary causes behind this failure to Export error: The file block settings block the type of file you are trying to export. This...
Read more >
Exporting to xlsx using Python and XlsxWriter - Stack Overflow
I´m using XlsxWriter (version 1.0.2) for creating an Excel file, but when I exporting and opening it, an error is showed: “We found...
Read more >
this operation is not supported for this document" | Holistics Docs
This error happens normally because the file was saved in .xlsx extension and you need to converted it to Google Sheet format by...
Read more >
WebDocumentViewer Export to .xlsx gives error 500 when ...
At the same time, it is not possible to reduce the amount of memory required to export this document to Excel. So, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found