GNOME Bugzilla – Bug 573587
Crash on spellcheck configuration
Last modified: 2009-03-01 01:59:37 UTC
Steps to reproduce: Tools -> Configure spell-check reproducible (happens every time) Stack trace: Traceback File: usr/lib/python2.5/site-packages/gaupol/gtk/agents/text.py Line: 40 In: on_configure_spell_check_activate dialog = gaupol.gtk.LanguageDialog(self.window) File: usr/lib/python2.5/site-packages/gaupol/base/contractual.py Line: 43 In: inner_wrapper value = function(*args, **kwargs) File: usr/lib/python2.5/site-packages/gaupol/base/contractual.py Line: 59 In: inner_wrapper return function(*args, **kwargs) File: usr/lib/python2.5/site-packages/gaupol/gtk/dialogs/language.py Line: 45 In: __init__ self._init_tree_view() File: usr/lib/python2.5/site-packages/gaupol/base/contractual.py Line: 43 In: inner_wrapper value = function(*args, **kwargs) File: usr/lib/python2.5/site-packages/gaupol/gtk/dialogs/language.py Line: 79 In: _init_tree_view self._populate_store(store) File: usr/lib/python2.5/site-packages/gaupol/base/contractual.py Line: 43 In: inner_wrapper value = function(*args, **kwargs) File: usr/lib/python2.5/site-packages/gaupol/gtk/dialogs/language.py Line: 122 In: _populate_store append(locale) File: usr/lib/python2.5/site-packages/gaupol/util.py Line: 168 In: inner_wrapper return function(*args, **kwargs) File: usr/lib/python2.5/site-packages/gaupol/gtk/dialogs/language.py Line: 119 In: append name = gaupol.locales.code_to_name(locale) File: usr/lib/python2.5/site-packages/gaupol/util.py Line: 73 In: wrapper return function(*args, **kwargs) File: usr/lib/python2.5/site-packages/gaupol/locales.py Line: 75 In: code_to_name language = code_to_language(code) File: usr/lib/python2.5/site-packages/gaupol/util.py Line: 73 In: wrapper return function(*args, **kwargs) File: usr/lib/python2.5/site-packages/gaupol/locales.py Line: 64 In: code_to_language return gaupol.languages.code_to_name(code[:2]) File: usr/lib/python2.5/site-packages/gaupol/util.py Line: 73 In: wrapper return function(*args, **kwargs) File: usr/lib/python2.5/site-packages/gaupol/languages.py Line: 51 In: code_to_name return gaupol.i18n.dgettext("iso_639", languages[code]) KeyError: 'ns' Other information: Gaupol: 0.12.3 Python: 2.5.2 GTK: 2.14.4 PyGTK: 2.13.0 PyEnchant: 1.4.2 Universal Encoding Detector: 1.0.1 OS: Ubuntu Intrepid Desktop environment: GNOME
This was probably fixed in the below commit last year. If you need a quick workaround, just find the locales.txt file, which should usually be either at /usr/share/gaupol/codes or /usr/local/share/gaupol/codes and remove the 'ns_ZA' line. 2008-08-16 Osmo Salomaa <otsaloma@cc.hut.fi> * data/codes/locales.txt: Remove 'ns_ZA', for 'ns' is not found in 'iso_639.xml'. Just in case, I added code to catch that KeyError also. commit e3a484891516b7a59811e58456a994f4acec7b31 Author: Osmo Salomaa <otsaloma@cc.hut.fi> Date: Sun Mar 1 02:09:25 2009 +0200 Catch LookupError on locales.code_to_name. If locales.code_to_name raises KeyError in either LanguageDialog or SpellCheckDialog, catch that error and use the plain locale code instead of the usual 'Language (Country)'. This may occur if data/codes/locales.txt and data/codes/iso_639.xml are not kept in sync, which though should be avoided by current unit tests.
Thanks, removing ns_ZA and restarting did the trick.