Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot export contacts excel file when no contact exist. #82

Open
hsiao19 opened this issue Mar 19, 2016 · 0 comments
Open

Cannot export contacts excel file when no contact exist. #82

hsiao19 opened this issue Mar 19, 2016 · 0 comments

Comments

@hsiao19
Copy link

hsiao19 commented Mar 19, 2016

Cannot export contacts excel file when no contact exist.

Error message:

IndexError at /admin/newsletter/contact/export_excel/
list index out of range

Request Method: GET
Request URL: http://127.0.0.1:8000/admin/newsletter/contact/export_excel/
Django Version: 1.8.6
Exception Type: IndexError
Exception Value:
list index out of range
Exception Location: D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages\emencia\django\newsletter\utils\excel.py in init, line 21
Python Executable: D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\Scripts\python.exe
Python Version: 2.7.10
Python Path:
['D:\intern\code\Mercurius\Projects\Newsletter\Nuwa',
'D:\intern\code\Mercurius\Projects\Newsletter\Nuwa',
'D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib',
'D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\Scripts',
'C:\Python27\Lib',
'C:\Python27\DLLs',
'C:\Python27\Lib\lib-tk',
'D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus',
'D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages',
'C:\windows\system32\python27.zip',
'D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\DLLs',
'D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\plat-win',
'D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\lib-tk']
Server time: 星期三, 9 三月 2016 17:47:55 +0800

Traceback Switch to copy-and-paste view

D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages\django\core\handlers\base.py in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs) ...
▶ Local vars
D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages\django\utils\decorators.py in _wrapped_view
response = view_func(request, _args, *_kwargs) ...
▶ Local vars
D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages\django\views\decorators\cache.py in _wrapped_view_func
response = view_func(request, _args, *_kwargs) ...
▶ Local vars
D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages\django\contrib\admin\sites.py in inner
return view(request, _args, *kwargs) ...
▶ Local vars
D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages\emencia\django\newsletter\admin\contact.py in exportation_excel
'contacts_edn
%s' % datetime.now().strftime('%d-%m-%Y')) ...
▶ Local vars
D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages\emencia\django\newsletter\admin\contact.py in export_excel
return ExcelResponse(queryset, export_name) ...
▶ Local vars
D:\intern\code\Iuno\TheophrastusDemo\virtualenv\Theophrastus\lib\site-packages\emencia\django\newsletter\utils\excel.py in init
if isinstance(data[0], dict): ...
▶ Local vars

hsiao19 pushed a commit to nuwainfo/emencia-django-newsletter that referenced this issue Mar 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant