You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <de...@bloodhound.apache.org> on 2013/09/04 21:33:15 UTC
Re: [Apache Bloodhound] #655: Genshi unicode error rendering widget
(was: Unicode error rendering widget)
#655: Genshi unicode error rendering widget
------------------------+----------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: critical | Milestone:
Component: dashboard | Version:
Resolution: | Keywords: genshi unicode
------------------------+----------------------------
Changes (by olemis):
* component: => dashboard
* priority: major => critical
* keywords: => genshi unicode
* owner: => nobody
Old description:
> I've got the following error when trying to render third-party widgets .
>
> [[span(Log entry, class=label label-important)]]
> {{{
> 2013-09-04 15:22:51,460 Trac[formatter] ERROR: Macro
> Widget(HighStockTimeline, width=600, height=550, title=Apache Bloodhound
> commits during March 2013, type=area, leg_enabled=true,
> pl_stacking=normal, product=bhnet, data_source=/gviz/timeline/log,
> data_query="select `toDate(date)`\, count(timestamp) group by
> toDate(`date`) pivot author where kind = 'changeset' and (author starts
> with 'Ryan Ollos' or author starts with 'Jure Žitnik') and year(`date`) =
> 2013 and month(`date`) = 2 label `toDate(date)` 'Date'") failed:
> }}}
>
> [[span(Traceback, , class=label label-important)]]
> {{{#!py
>
> Traceback (most recent call last):
> File "/path/to/bloodhound/trac/trac/wiki/formatter.py", line 765, in
> _macro_formatter
> return macro.ensure_inline(macro.process(args))
> File "/path/to/bloodhound/trac/trac/wiki/formatter.py", line 380, in
> ensure_inline
> text = _markup_to_unicode(text)
> File "/path/to/bloodhound/trac/trac/wiki/formatter.py", line 107, in
> _markup_to_unicode
> markup = stream.render('xhtml', encoding=None,
> strip_whitespace=False)
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 183, in render
> return encode(generator, method=method, encoding=encoding, out=out)
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 57, in encode
> return _encode(''.join(list(iterator)))
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 371, in __call__
> yield _emit(kind, data, escape(data, quotes=False))
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 517, in escape
> return cls(text)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 167:
> ordinal not in range(128)
> }}}
>
> `Widget` macro must handle such errors gracefully
>
> Page is not rendered, only error message.
New description:
I've got the following error when trying to render third-party widgets .
[[span(Log entry, class=label label-important)]]
{{{
2013-09-04 15:22:51,460 Trac[formatter] ERROR: Macro
Widget(HighStockTimeline, width=600, height=550, title=Apache Bloodhound
commits during March 2013, type=area, leg_enabled=true,
pl_stacking=normal, product=bhnet, data_source=/gviz/timeline/log,
data_query="select `toDate(date)`\, count(timestamp) group by
toDate(`date`) pivot author where kind = 'changeset' and (author starts
with 'Ryan Ollos' or author starts with 'Jure Žitnik') and year(`date`) =
2013 and month(`date`) = 2 label `toDate(date)` 'Date'") failed:
}}}
[[span(Traceback, , class=label label-important)]]
{{{#!py
Traceback (most recent call last):
File "/path/to/bloodhound/trac/trac/wiki/formatter.py", line 765, in
_macro_formatter
return macro.ensure_inline(macro.process(args))
File "/path/to/bloodhound/trac/trac/wiki/formatter.py", line 380, in
ensure_inline
text = _markup_to_unicode(text)
File "/path/to/bloodhound/trac/trac/wiki/formatter.py", line 107, in
_markup_to_unicode
markup = stream.render('xhtml', encoding=None, strip_whitespace=False)
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 183, in render
return encode(generator, method=method, encoding=encoding, out=out)
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 57, in encode
return _encode(''.join(list(iterator)))
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 371, in __call__
yield _emit(kind, data, escape(data, quotes=False))
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 517, in escape
return cls(text)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 167:
ordinal not in range(128)
}}}
`Widget` macro must handle such errors gracefully
Page is not rendered, only error message.
version = 0.8-dev
--
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/655#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker