Opened 16 years ago
Closed 14 years ago
#4855 closed defect (fixed)
UnicodeDecodeError using hr_HR.UTF8
Reported by: | anonymous | Owned by: | Jeff Hammel |
---|---|---|---|
Priority: | normal | Component: | TracHoursPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
When I try to access /hours using hr_HR.UTF8 encoding this error pops up:
Genshi UnicodeDecodeError error while rendering template '/usr/lib/python2.5/site-packages/TracHoursPlugin-0.3.1-py2.5.egg/trachours/templates/hours_query_results.html', line 59, char -1
Using en_EN.UTF8 everything works fine
Attachments (2)
Change History (14)
comment:1 Changed 15 years ago by
comment:2 follow-up: 3 Changed 15 years ago by
As #4420, I added "to_unicode()" funcion to error template and the function works well. I don't have error message. (I could not attatch the diff because of spam check.)
comment:3 Changed 15 years ago by
Replying to nac:
As #4420, I added "to_unicode()" funcion to error template and the function works well. I don't have error message. (I could not attatch the diff because of spam check.)
If you upload the diff or just paste it, i'd be happy to include it. It is difficult for me to test here, and TracHoursPlugin is no longer a company priority, so my efforts towards its maintainence will be minimal.
comment:4 follow-up: 5 Changed 15 years ago by
upload the diff. (Beacuse spam check for upload file, it's gzipped.)
if I get same error on the other templates, I will make diff and paste again.
comment:5 follow-up: 6 Changed 15 years ago by
Replying to nac:
upload the diff. (Beacuse spam check for upload file, it's gzipped.)
if I get same error on the other templates, I will make diff and paste again.
I just get some random binary data after gunzipping. If its short, can you just paste it in a comment? thanks
comment:6 follow-up: 7 Changed 15 years ago by
Replying to k0s:
I just get some random binary data after gunzipping. If its short, can you just paste it in a comment? thanks
Oops, sorry that. I attached a file gzipped twice. I attache correct one. And the diff contains spam blacklist term "href", so I could not paste entire file. (when attachment file or comment contains href trac warns
500 Internal Server Error (Submission rejected as potential spam (Content contained these blacklisted patterns: ...)
and reject it. )
comment:7 Changed 15 years ago by
Replying to nac:
Replying to k0s:
I just get some random binary data after gunzipping. If its short, can you just paste it in a comment? thanks
Oops, sorry that. I attached a file gzipped twice. I attache correct one. And the diff contains spam blacklist term "href", so I could not paste entire file. (when attachment file or comment contains href trac warns
500 Internal Server Error (Submission rejected as potential spam (Content contained these blacklisted patterns: ...)and reject it. )
Still can't read the file. Maybe mail otaku about this? Still receive an error of it being a binary file.
comment:8 Changed 15 years ago by
Hmm, I just attach correct gzipped file, but it seems gzipped again. It means that attached file is gzipped twice. I don't know why.
trac Hack ticket system has a little bit too strict anti-spam scanner, it could be cause of false positive error, I think. (Or just I don't understand the usage of the ticket system.)
Oh, anyway please decompress twice for the file. Sorry!
comment:9 Changed 15 years ago by
just diff.
$ diff --ignore-matching-lines=href hours_query_results.html hours_query_results.html.new 54,58c54,58 < <py:when test="isinstance(value, datetime)">${dateinfo(value)}</py:when> < <py:when test="name == 'reporter'">${authorinfo(value)}</py:when> < <py:when test="name == 'cc'">${format_emails(ticket_context, value)}</py:when> < <py:when test="name == 'owner' and value">${authorinfo(value)}</py:when> < <py:otherwise>$value</py:otherwise> --- > <py:when test="isinstance(value, datetime)">${to_unicode(dateinfo(value))}</py:when> > <py:when test="name == 'reporter'">${to_unicode(authorinfo(value))}</py:when> > <py:when test="name == 'cc'">${to_unicode(format_emails(ticket_context, value))}</py:when> > <py:when test="name == 'owner' and value">${to_unicode(authorinfo(value))}</py:when> > <py:otherwise>${to_unicode(value)}</py:otherwise>
comment:11 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I got same error again on another template, hours_ticket.html. Here is its diff;
$ diff -c hours_ticket.html hours_ticket.html.org *** hours_ticket.html 2009-07-21 23:41:06.247474407 +0900 --- hours_ticket.html.org 2009-07-21 23:37:55.600403949 +0900 *************** *** 46,52 **** </td> </py:choose> <td> ! ${to_unicode(record['date_started'])} </td> <td> ${record['comments']} --- 46,52 ---- </td> </py:choose> <td> ! ${record['date_started']} </td> <td> ${record['comments']}
comment:12 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I met same error on ja_JP.utf8.
Now I use trac 0.11-4