wger-project / wger

Self hosted FLOSS fitness/workout, nutrition and weight tracker
https://wger.de
GNU Affero General Public License v3.0
3.23k stars 587 forks source link

Traceback when exporting weight to CSV #40

Closed rolandgeider closed 11 years ago

rolandgeider commented 11 years ago

This probably happens because the translations for 'weight' and 'date' are not ASCII

Traceback (most recent call last):

  File "/home/rge/www/python-django/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/home/rge/www/python-django/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
    return view_func(request, *args, **kwargs)

  File "/home/rge/www/wger-patched/wger/weight/views.py", line 117, in export_csv
    writer.writerow([_('Weight'), _('Date')])

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)
rolandgeider commented 11 years ago

Fixed with d43c29bb29f985acd2ae9dcac73108617283932f