Bug 16090 - msecgui crashs in non ascii language enviroment (tested in Greek)
Summary: msecgui crashs in non ascii language enviroment (tested in Greek)
Status: RESOLVED DUPLICATE of bug 13837
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-08 12:47 CEST by Dimitrios Glentadakis
Modified: 2015-07-28 11:00 CEST (History)
1 user (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Dimitrios Glentadakis 2015-06-08 12:47:40 CEST
Cannot start msecgui, from mcc or from terminal

Traceback (most recent call last):
  File "/usr/share/msec/msecgui.py", line 1792, in <module>
    gui = MsecGui(log, msec, perms, msec_config, perm_conf, exceptions, embed=PlugWindowID)
  File "/usr/share/msec/msecgui.py", line 248, in __init__
    self.main_notebook.append_page(self.create_summary_ui(), Gtk.Label(label=_("Overview")))
  File "/usr/share/msec/msecgui.py", line 665, in create_summary_ui
    label = Gtk.Label(label=_("Check: %s. Last run: %s") % (check, updated))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in range(128)

I can start it with success with this command:
LC_ALL=C msecgui

I asked in the Greek forum and others could reproduce the crash too.
Maybe French environment could be also affected:
http://www.mageialinux-online.org/forum/topic-19805+msecgui-ne-se-lance-pas-dans-le-mcc.php



I could fix it by adding an exception:


 --- msecgui.origin.py   2015-05-20 01:05:09.000000000 +0200
+++ msecgui.py  2015-06-07 19:29:55.161228339 +0200
@@ -659,7 +659,11 @@
         for check, logfile, updated_n, updated in tools.periodic_check_status(log):
             if not updated:
                 updated = _("Never")
-            label = Gtk.Label(label=_("Check: %s. Last run: %s") % (check, updated))
+            try:
+                label = Gtk.Label(label=_("Check: %s. Last run: %s") % (check, updated))
+            except UnicodeDecodeError:
+                updated = updated.decode('utf-8')
+                label = Gtk.Label(label=_("Check: %s. Last run: %s") % (check, updated))
             label.set_property("xalign", 0.0)
             table.attach(label, 2, 3, row, row + 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, 0, 0, 0) 



Reproducible: 

Steps to Reproduce:
Dimitrios Glentadakis 2015-06-08 13:17:13 CEST

Summary: msecgui crashs in non latin enviroment (tested in Greek) => msecgui crashs in non ascii language enviroment (tested in Greek)

Comment 1 Dimitrios Glentadakis 2015-06-08 13:26:56 CEST
Oops, i 've just see it

*** This bug has been marked as a duplicate of bug 13837 ***

Status: NEW => RESOLVED
Resolution: (none) => DUPLICATE

Comment 2 Dimitrios Glentadakis 2015-06-21 08:48:39 CEST
It is similar bug with the 13837 but not the same traceback though

Status: RESOLVED => REOPENED
Resolution: DUPLICATE => (none)

Comment 3 Marja Van Waes 2015-07-21 23:58:17 CEST
(In reply to Dimitrios Glentadakis from comment #2)
> It is similar bug with the 13837 but not the same traceback though

Can you please try whether the patch for that bug works for you, too?
https://bugs.mageia.org/attachment.cgi?id=6815

CC: (none) => marja11

Comment 4 Dimitrios Glentadakis 2015-07-28 09:28:03 CEST
Thanks Marja, i will check it, it should be fine as i see this in the patch you mention:

-            label = Gtk.Label(label=_("Check: %s. Last run: %s") % (check, updated))
+            label = Gtk.Label(label=_("Check: %s. Last run: %s") % (Narg(check), Narg(updated)))
Comment 5 Thierry Vignaud 2015-07-28 11:00:07 CEST
This is a duplicate (same root cause)

*** This bug has been marked as a duplicate of bug 13837 ***

Status: REOPENED => RESOLVED
Resolution: (none) => DUPLICATE


Note You need to log in before you can comment on or make changes to this bug.