Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

'Dataset' object has no attribute 'xls' #88

Open
tobifroe opened this issue Sep 25, 2020 · 2 comments
Open

'Dataset' object has no attribute 'xls' #88

tobifroe opened this issue Sep 25, 2020 · 2 comments

Comments

@tobifroe
Copy link

When trying to export form submissions as a Microsoft Excel file, I get an AttributeError. Other export formats work fine.
The traceback looks like this:

[25/Sep/2020 10:03:44] "POST /admin/djangocms_forms/formsubmission/export/ HTTP/1.1" 200 76
/home/vagrant/project/lib/python3.6/site-packages/django/db/models/fields/init.py:1393: RuntimeWarning: DateTimeField FormSubmission.creation_date received a naive datetime (2020-09-25 00:00:00) while time zone support is active.
RuntimeWarning)
/home/vagrant/project/lib/python3.6/site-packages/django/db/models/fields/init.py:1393: RuntimeWarning: DateTimeField FormSubmission.creation_date received a naive datetime (2020-09-26 00:00:00) while time zone support is active.
RuntimeWarning)
2020-09-25 10:05:21,005 django.request ERROR Internal Server Error: /admin/djangocms_forms/formsubmission/export/
Traceback (most recent call last):
File "/home/vagrant/project/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/home/vagrant/project/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/vagrant/project/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File "/home/vagrant/project/lib/python3.6/site-packages/djangocms_forms/admin.py", line 105, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/vagrant/project/lib/python3.6/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/vagrant/project/lib/python3.6/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/home/vagrant/project/lib/python3.6/site-packages/django/contrib/admin/sites.py", line 224, in inner
return view(request, *args, **kwargs)
File "/home/vagrant/project/lib/python3.6/site-packages/djangocms_forms/admin.py", line 238, in export_view
getattr(dataset, file_type), {
AttributeError: 'Dataset' object has no attribute 'xls'

Did I miss something while configuring or is there somehting else going on?

@wesleyboar
Copy link

You might need to install tablib extras to support 'xls'. For more information, see avryhof#8.

@avryhof
Copy link

avryhof commented Jun 14, 2022

I'll dig into Excel and YAML support soon, but for now, there is an option to remove them from the interface.

https://github.com/avryhof/djangocms-forms
https://pypi.python.org/pypi/djangocms-forms-maintained/

pip install --upgrade djsngocms-forms-maintained

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants