GNOME Bugzilla – Bug 671261
UnicodeDecodeError breaks the interface viewer
Last modified: 2012-05-26 21:11:12 UTC
Steps to reproduce: 1. Set language to Spanish 2. Launch Accerciser Expected results: The interface viewer would be functional Actual results: The interface viewer is not functional. And at least in my environment (admittedly unstable), crashes Accerciser when the selection changes in the interface viewer's combobox. Traceback (most recent call last):
+ Trace 229787
return self.func(*args, **kwargs)
_SectionAction(ui_xml, self.node),
self._setExpanderChildrenSensitive(False)
elif _('(not implemented)') not in label_text:
for section_obj in self.sections:
Oops, thought the errors were copied too. :-/ Sorry for the spam! UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128) Traceback (most recent call last):
+ Trace 229788
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/accerciser/plugin/base_plugin.py", line 157, in __call__ return self.func(*args, **kwargs) File "/usr/share/accerciser/plugins/interface_view.py", line 134, in onAccChanged for section_obj in self.sections: File "/usr/lib/python2.7/site-packages/accerciser/plugin/base_plugin.py", line 123, in __getattribute__
Hi Joanie, thanks for your report! I can't reproduce this problem in my devel environment. I'm using jhbuild under Fedora 16. My jhbuild environment was updated yesterday, and my interface viewer isn't causing these problems at all. About the UnicodeDecode errors, I'm not having them, but just realized that some translations aren't working well. I'll investigate a little bit more about this issue. I'm supposing that you're under a Fedora raw, but please, more information about your environment could help a little, like ie, your python version. Thanks and regards!
$ python Python 2.7.2 (default, Jan 4 2012, 20:44:07) [GCC 4.7.0 20120103 (Red Hat 4.7.0-0)] on linux2 Type "help", "copyright", "credits" or "license" for more information. It's a tad bigger than just the UnicodeDecodeError. It seems like your InterfaceViewer class's init() falls back on the widget label [1] for expanders of sections which do not subclass _InterfaceSection (like the Collection interface). When you are falling back on the label for the name in a non-English locale, you get the translated name (like colección). Then when you create the new section with the non-English interface name, you fail to get the expander [2]. BTW, I filed this bug because the Debian packager who is trying to include Accerciser 3.3 in a mostly 3.2 environment is running up against it. So perhaps you could try Accerciser master in Fedora 16 outside of jhbuild? [1] http://git.gnome.org/browse/accerciser/tree/plugins/interface_view.py#n93 [2] http://git.gnome.org/browse/accerciser/tree/plugins/interface_view.py#n169
I confirm this bug on Arch Linux with Hungarian locale. Accerciser is totally unusable due this bug. Tested with the latest 3.4.1 release with python 2.7.3.
Created attachment 214172 [details] [review] proposed patch Hi all! Here's a patch that should fix the problem. I added dummy implementations for some unimplemented interfaces and added a couple of unicode checks. I tested it with English, Spanish and Hungarian language and all seem to work as expected. I tested with openSUSE 12.1 (which has Gnome 3.2). More testing on different environments than openSUSE 12.1 will be very appreciated, Cheers!!
*** Bug 622537 has been marked as a duplicate of this bug. ***
Review of attachment 214172 [details] [review]: commited: 06b16a05d79e9664f4475d89dd7badae24bda62d