Ticket #8570 (closed defect: fixed)

Opened 2 years ago

Last modified 7 months ago

Genshi UnicodeDecodeError at hours_ticket.html

Reported by: anonymous Assigned to: rjollos
Priority: high Component: TracHoursPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12

Description (Last modified by rjollos)

Genshi UnicodeDecodeError error while rendering template '/var/trac/.egg-cache/TracHoursPlugin-0.5.2-py2.4.egg-tmp/trachours/templates/hours_ticket.html', line 39, char -1

Attachments

Change History

03/15/11 18:35:42 changed by anonymous

You probably have a special character in your date like "März".

Try:

<td>${unicode(record['date_started'], 'utf-8')}</td>

03/16/11 19:18:10 changed by anonymous

I had the same issue with the 0.11 version. What helped me was the above with the following exceptions:

  • the function name is to_unicode()
  • omit the second parameter 'utf-8'

So what worked for me was:

<td>${to_unicode(record['date_started'])}</td>

By the way: what would happen, if someone uses special characters within their comments? Would that be dealt with directly when they enter the comment or would we face the same error

09/12/12 08:25:54 changed by rjollos

  • description changed.

10/19/12 02:19:34 changed by rjollos

(In [12205]) Refs #8570:

  • Fixed UnicodeDecode? Error when rendering template for /hours/<id> when months contained unicode characters.
  • Misc refactoring. The data dictionary in process_ticket was being implicitly populated. Changed this to explicit population of the dictionary to improve code clarify and make it easier to eliminate unused variables.

10/19/12 02:21:06 changed by rjollos

  • status changed from new to closed.
  • resolution set to fixed.

Please report back how it is working for you if you have a chance to test with the latest version of the trunk.


Add/Change #8570 (Genshi UnicodeDecodeError at hours_ticket.html)




Change Properties
Action