pycha doesn't work with unicode characters

20 views
Skip to first unread message

Vicente Ruiz

unread,
Apr 5, 2010, 10:14:02 AM4/5/10
to pycha
I discovered pycha two o three weeks ago, but I like it very much! I
think that support unicode in pycha is very important. This is a trace
example when you use unicode in title or labels:

File "report.py", line 63, in bar_chart
chart.render()
File "/usr/lib/pymodules/python2.6/pycha/chart.py", line 104, in
render
self._renderAxis(cx)
File "/usr/lib/pymodules/python2.6/pycha/chart.py", line 513, in
_renderAxis
self._renderYAxisLabel(cx, self.options.axis.y.label)
File "/usr/lib/pymodules/python2.6/pycha/chart.py", line 461, in
_renderYAxisLabel
label = unicode(labelText)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
3: ordinal not in range(128)

A greeting,
Vicente Ruiz

Lorenzo Gil Sanchez

unread,
Apr 5, 2010, 10:40:54 AM4/5/10
to py...@googlegroups.com
Hi Vicente

2010/4/5 Vicente Ruiz <vrui...@gmail.com>:


> I discovered pycha two o three weeks ago, but I like it very much! I
> think that support unicode in pycha is very important. This is a trace
> example when you use unicode in title or labels:

You are right. Pycha should not try to convert anything to unicode but
be a little bit smarter and check if what it gets is already unicode
and otherwise convert it to unicode using a charset. Probably the
charset should be provided as an option.

Vicente, would you mind creating an issue in Pycha bug tracking system
at bitbucket?:

http://bitbucket.org/lgs/pycha/issues/new/

Thanks a lot!

Lorenzo

>
> File "report.py", line 63, in bar_chart
>    chart.render()
>  File "/usr/lib/pymodules/python2.6/pycha/chart.py", line 104, in
> render
>    self._renderAxis(cx)
>  File "/usr/lib/pymodules/python2.6/pycha/chart.py", line 513, in
> _renderAxis
>    self._renderYAxisLabel(cx, self.options.axis.y.label)
>  File "/usr/lib/pymodules/python2.6/pycha/chart.py", line 461, in
> _renderYAxisLabel
>    label = unicode(labelText)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 3: ordinal not in range(128)
>
> A greeting,
> Vicente Ruiz
>

> --
> You received this message because you are subscribed to the Google Groups "pycha" group.
> To post to this group, send email to py...@googlegroups.com.
> To unsubscribe from this group, send email to pycha+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pycha?hl=en.
>
>

Vicente Ruiz

unread,
Apr 5, 2010, 3:19:12 PM4/5/10
to py...@googlegroups.com
All right! I did it.

Thanks you!

Vicente Ruiz

2010/4/5 Lorenzo Gil Sanchez <lorenzo.g...@gmail.com>
Reply all
Reply to author
Forward
0 new messages