UnicodeEncodeError
Created originally on Bitbucket by psychok7 (Nuno Khan)
I am getting a 'ascii' codec can't encode characters in position 6-7: ordinal not in range(128)
when i try to save with version 2.4.0-a1
and 2.4.0-b1
Everything works fine with version 2.3.5
so the issue is probably not with my code. i am using Python 2.7
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in wrapper
618. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
110. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in inner
233. return view(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
34. return bound_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
110. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
30. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in changelist_view
1576. response = self.response_action(request, queryset=cl.get_queryset(request))
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in response_action
1335. response = func(self, request, queryset)
File "/vagrant/stations/admin.py" in export_rating_xls
379. wb.save(response)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/workbook/workbook.py" in save
281. save_workbook(self, filename)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/writer/excel.py" in save_workbook
248. writer.save(filename, as_template=as_template)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/writer/excel.py" in save
231. self.write_data(archive, as_template=as_template)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/writer/excel.py" in write_data
78. self._write_worksheets(archive)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/writer/excel.py" in _write_worksheets
167. xml = sheet._write(self.workbook.shared_strings)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/worksheet/worksheet.py" in _write
839. return write_worksheet(self, shared_strings)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/writer/worksheet.py" in write_worksheet
161. xf.write(ws.HeaderFooter.to_tree())
File "/usr/local/lib/python2.7/dist-packages/openpyxl/descriptors/serialisable.py" in to_tree
138. node = obj.to_tree(child_tag)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/worksheet/header_footer.py" in to_tree
182. el.text = str(self)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/worksheet/header_footer.py" in __str__
166. txt.append("&{0}{1}".format(key, str(part)))
Exception Type: UnicodeEncodeError at /admin/stations/station/
Exception Value: 'ascii' codec can't encode characters in position 6-7: ordinal not in range(128)
Attachments: template_rating_export_temp.xlsx