Ticket #10233 (assigned defect)

Opened 10 months ago

Last modified 7 months ago

UnicodeDecode error when saving hours as csv (fix included)

Reported by: dolfandringa Assigned to: rjollos (accepted)
Priority: high Component: TracHoursPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.12

Description

When downloading a csv file from the /hours url, sometimes I get a UnicodeEncodeError?: 'ascii' codec can't encode character ... in position 21: ordinal not in range(128)

This error occurs when a user entered unicode characters in tickets/hour logs. When downloading the csv filein queryhours2csv, this error was trown.

The included diff fixes the error by properly encoding all strings as utf-8.

Attachments

fix.diff (1.4 kB) - added by dolfandringa on 08/06/12 13:38:49.

Change History

08/06/12 13:38:49 changed by dolfandringa

  • attachment fix.diff added.

08/06/12 13:40:14 changed by dolfandringa

  • severity changed from normal to critical.

08/06/12 13:40:42 changed by dolfandringa

  • priority changed from normal to high.

08/07/12 08:46:52 changed by rjollos

Duplicate of #8520 I think, but thanks for the patch. I will be able to test and apply it later this week.

#8520 closed as a duplicate.

10/19/12 10:32:49 changed by rjollos

  • status changed from new to assigned.

I'm having trouble reproducing the issue. Could you provide a screen capture from just before the export, as well as the traceback you get when exporting?


Add/Change #10233 (UnicodeDecode error when saving hours as csv (fix included))




Change Properties
Action