#4240 closed defect (worksforme)
[Patch] There is still error with non-ascii character if ticket's priorities or title contains non-ascii char
Reported by: | Yunior Armando Hernandez Andrade | Owned by: | Felix Tiede |
---|---|---|---|
Priority: | normal | Component: | TracTicketDepgraphPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
I just installed the pluggin and all requirements and give it a try... this error showed up
Trac detected an internal error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 171: ordinal not in range(128)
Attachments (1)
Change History (13)
comment:1 Changed 16 years ago by
Status: | new → assigned |
---|
comment:2 follow-up: 3 Changed 16 years ago by
well my trac was set for a spanish speaking development team so there are losts of accute caracters like (áéíóú) and probably some (äëïöü) but I'm not sure if those are non ascii caracters. Now i'm getting a similar error in some other parts of my trac, viewing some tickets details outputs the following error: File "build/bdist.linux-i686/egg/genshi/core.py", line 494, in escape
text = unicode(text).replace('&', '&') \
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1314: ordinal not in range(128)
so maybe it is not just your pluggin... anyway people will almost always (I did) download from any link with a zipped file than directly to repository so you should consider updating links to zipped files when creating a patch for you pluggin. I will keep track and report back... thanks.
comment:3 Changed 16 years ago by
Replying to yahernandez@estudiantes.uci.cu:
well my trac was set for a spanish speaking development team so there are losts of accute caracters like (áéíóú) and probably some (äëïöü) but I'm not sure if those are non ascii caracters.
Characters with accents (like á) are most certainly non-ascii at least and Umlauts (like ä) are probably non-ascii.
Now i'm getting a similar error in some other parts of my trac, viewing some tickets details outputs the following error: File "build/bdist.linux-i686/egg/genshi/core.py", line 494, in escape
text = unicode(text).replace('&', '&') \
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1314: ordinal not in range(128)
That one looks familiar and I assume similar lines in my plugin to cause this error. I have to ask you to test a patch I'll attach later to confirm my suspicion. If it solves the problem the patch will be integrated and available via zip-link from the wiki page.
Changed 16 years ago by
Attachment: | depgraph-encode-nonascii.patch added |
---|
Patch to decode non-ascii characters into entities for tooltips
comment:4 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 16 years ago by
comment:6 Changed 16 years ago by
comment:7 Changed 16 years ago by
Priority: | high → normal |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Just to say that, even with the new patches, we still have an error when having accents (éèà...) in our ticket summaries.
The displayed error is still the same : 'ascii' codec can't decode byte 0xc3 in position... For now, we wrote a function that strips the accent...
comment:8 Changed 16 years ago by
Summary: | doesn't generate anything → There is still error with non-ascii character if ticket's priorities contains non-ascii char |
---|
I donwloaded plugin from SVN (version 5234). There is still problem, if ticket priority contains unicode character. Here is stack trace:
2009-02-22 18:45:39,887 Trac[formatter] ERROR: Macro DepGraph(None) failed Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 468, in _macro_formatter return macro.process(args, in_paragraph=True) File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 179, in process text = self.processor(text) File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 166, in _macro_processor text) File "build/bdist.linux-x86_64/egg/depgraph/depgraph.py", line 232, in expand_macro result += self._depgraph_all(formatter.req) File "build/bdist.linux-x86_64/egg/depgraph/depgraph.py", line 90, in _depgraph_all bgcolor, border = self._get_color(str(ticket[1])) UnicodeEncodeError: 'ascii' codec can't encode character u'\u012b' in position 4: ordinal not in range(128)
comment:9 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:10 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | There is still error with non-ascii character if ticket's priorities contains non-ascii char → There is still error with non-ascii character if ticket's priorities or title contains non-ascii char |
Sorry, I just tryed it these days and it still doesn't work with accents in ticket's summary.
comment:11 Changed 15 years ago by
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
I've tested again with a newly created ticket with unicode characters and it works here.
I'm sorry, I can't reproduce the bug.
comment:12 Changed 15 years ago by
Summary: | There is still error with non-ascii character if ticket's priorities or title contains non-ascii char → [Patch] There is still error with non-ascii character if ticket's priorities or title contains non-ascii char |
---|
Do you have any non-ascii characters in your ticket's priorities or severities?
Did you try from a ticket without any non-ascii characters in its summary?
In the first case please try the latest revision ([4993]) and tell me if the problem remains.