Opened 6 years ago

Closed 5 years ago

#8570 closed defect (fixed)

Genshi UnicodeDecodeError at hours_ticket.html

Reported by: anonymous Owned by: Ryan J Ollos
Priority: high Component: TracHoursPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

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 (0)

Change History (5)

comment:1 Changed 6 years ago by anonymous

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


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

comment:2 Changed 6 years ago 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:


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

comment:3 Changed 5 years ago by Ryan J Ollos

Description: modified (diff)

comment:4 Changed 5 years ago by Ryan J Ollos

(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.

comment:5 Changed 5 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.