#1120: report editor crashs if sample data has unicode
------------------------+---------------------------------------------------
Reporter: carl | Owner: ed
Type: defect | Status: assigned
Priority: major | Milestone: 0.8.3
Component: reporting | Version: 0.8.2
Resolution: | Keywords: unicode
------------------------+---------------------------------------------------
Old description:
> (python:12684): Gtk-CRITICAL **: gtk_widget_add_accelerator: assertion
> `GTK_IS_WIDGET (widget)' failed
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-
> packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14095, in <lambda>
> lambda event: event.callable(*event.args, **event.kw) )
> File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dPemMixin.py", line
> 843, in raiseEvent
> else:
> File "/usr/lib/python2.5/site-packages/dabo/lib/eventMixin.py", line
> 92, in raiseEvent
> bindingFunction(event)
> File "/home/carl/dabodev/dabomodule/ide/ReportDesigner.py", line 2327,
> in onLeaveXmlEditorPage
> report = editor._rw._getFormFromXML(editBox.Value)
> File "/usr/lib/python2.5/site-packages/dabo/lib/reportWriter.py", line
> 1816, in _getFormFromXML
> def _getFormFromXML(self, xml):
> File "/usr/lib/python2.5/site-packages/dabo/lib/xmltodict.py", line
> 182, in xmltodict
> ret = parser.Parse(xml)
> File "/usr/lib/python2.5/site-packages/dabo/lib/xmltodict.py", line
> 156, in Parse
> ParserStatus = Parser.Parse(xml, 1)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u0107' in
> position 4521: ordinal not in range(128)
New description:
(python:12684): Gtk-CRITICAL **: gtk_widget_add_accelerator: assertion
`GTK_IS_WIDGET (widget)' failed
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 14095, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dPemMixin.py", line
843, in raiseEvent
else:
File "/usr/lib/python2.5/site-packages/dabo/lib/eventMixin.py", line 92,
in raiseEvent
bindingFunction(event)
File "/home/carl/dabodev/dabomodule/ide/ReportDesigner.py", line 2327,
in onLeaveXmlEditorPage
report = editor._rw._getFormFromXML(editBox.Value)
File "/usr/lib/python2.5/site-packages/dabo/lib/reportWriter.py", line
1816, in _getFormFromXML
def _getFormFromXML(self, xml):
File "/usr/lib/python2.5/site-packages/dabo/lib/xmltodict.py", line 182,
in xmltodict
ret = parser.Parse(xml)
File "/usr/lib/python2.5/site-packages/dabo/lib/xmltodict.py", line 156,
in Parse
ParserStatus = Parser.Parse(xml, 1)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0107' in
position 4521: ordinal not in range(128)
Comment (by carl):
[EMAIL PROTECTED]:~/dabodev/dabomodule$ svn up
U ide/ReportDesigner.py
U dabo/lib/xmltodict.py
U dabo/__version__.py
Updated to revision 3711.
I have the change, but it behaves the same as before: I cut/paste Krstić
into the xml window and get the error but no error if I use Krsti\xc4\x87
- I am guessing this is a case of "don't do that." I will be doing some
reading on unicode tonight, because right now I am not really sure what I
am doing.
(python:15106): Gtk-CRITICAL **: gtk_widget_add_accelerator: assertion
`GTK_IS_WIDGET (widget)' failed
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 14095, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dPemMixin.py", line
842, in raiseEvent
super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
**kwargs)
File "/usr/lib/python2.5/site-packages/dabo/lib/eventMixin.py", line 92,
in raiseEvent
bindingFunction(event)
File "/home/carl/dabodev/dabomodule/ide/ReportDesigner.py", line 2325,
in onLeaveXmlEditorPage
report = editor._rw._getFormFromXML(editBox.Value)
File "/usr/lib/python2.5/site-packages/dabo/lib/reportWriter.py", line
1820, in _getFormFromXML
xmldict = xmltodict(xml)
File "/usr/lib/python2.5/site-packages/dabo/lib/xmltodict.py", line 182,
in xmltodict
ret = parser.Parse(xml)
File "/usr/lib/python2.5/site-packages/dabo/lib/xmltodict.py", line 156,
in Parse
ParserStatus = Parser.Parse(xml, 1)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0107' in
position 4521: ordinal not in range(128)
--
Ticket URL: <http://trac.dabodev.com/ticket/1120#comment:4>
Dabo Trac <http://trac.dabodev.com>
Trac Page for Dabo
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]