Bug 12882 - net_monitor needs unicode
Summary: net_monitor needs unicode
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: has_procedure advisory MGA4-64-OK MGA...
Keywords: PATCH, validated_update
Depends on:
Blocks:
 
Reported: 2014-02-26 13:38 CET by Alex Loginov
Modified: 2014-04-05 21:43 CEST (History)
4 users (show)

See Also:
Source RPM: net_monitor
CVE:
Status comment:


Attachments

Description Alex Loginov 2014-02-26 13:38:50 CET
Description of problem: net_monitor does not work with Russian
[user@localhost ~]$ net_monitor
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 633, in <lambda>
    return (lambda data: callback(*data), user_data)
  File "/usr/bin/net_monitor", line 498, in update
    self.ifaces[iface][widget].set_text(str(value))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-9: ordinal not in range(128)

If to delete /usr/share/locale/ru/LC_MESSAGES/net_monitor.mo, then net_monitor works.

Version-Release number of selected component (if applicable): net_monitor-0.16-1.mga4


How reproducible: always


Steps to Reproduce:
1. run net_monitor in Russian
2. net_monitor shows nothing
3. delete /usr/share/locale/ru/LC_MESSAGES/net_monitor.mo
4. net_monitor works in English


Reproducible: 

Steps to Reproduce:
Alex Loginov 2014-02-26 14:07:57 CET

Assignee: bugsquad => thierry.vignaud

Comment 1 Alex Loginov 2014-02-27 11:33:48 CET
It is problem for python-2.7.6-1 from updates, no problem for python-2.7.5-11 from core.
Samuel Verschelde 2014-02-27 11:46:30 CET

CC: (none) => stormi
Whiteboard: (none) => MGA4TOO

Comment 2 Alex Loginov 2014-02-27 12:03:21 CET
Patch for /bin/net_monitor:

self.ifaces[iface][widget].set_text(str(value))
--- >
self.ifaces[iface][widget].set_text(unicode(value))

Summary: net_monitor does not work with Russian => net_monitor needs unicode for python-2.7.6

Comment 3 Alex Loginov 2014-02-27 14:01:30 CET
No, it's not python problem, net_monitor-0.15 works with python-2.7.6-1.
This issue is present in net_monitor-0.16.

Summary: net_monitor needs unicode for python-2.7.6 => net_monitor needs unicode

Samuel Verschelde 2014-02-27 14:11:48 CET

Keywords: (none) => PATCH

Comment 4 Thierry Vignaud 2014-03-30 00:38:54 CET
Fixed in git

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

Comment 5 Alex Loginov 2014-03-30 08:07:00 CEST
Thierry, please provide an update for mga4. This bug https://bugs.mageia.org/show_bug.cgi?id=12047 is not OK, but there is net_monitor-0.16 in updates.

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

Comment 6 Alex Loginov 2014-04-05 09:40:55 CEST
I have uploaded a updated package for Mageia 4.

Suggested advisory:
========================

Updated net_monitor package fix:
- use of str() instead of unicode().
without fix net_monitor started, but did not work, was broken

========================

Updated packages in core/updates_testing:
========================
net_monitor-0.17-1.mga4.i586.rpm
net_monitor-0.17-1.mga4.x86_64.rpm

Source RPMs: 
net_monitor-0.17-1.mga4.src.rpm

Version: Cauldron => 4
Assignee: thierry.vignaud => qa-bugs

Comment 7 David GEIGER 2014-04-05 19:24:41 CEST
Tested mga4_64,

Testing complete for net_monitor-0.17-1.mga4, Ok for me.
I can also reproduce this bug on French system and I confirm that this bug is fixed with this update.

Before:
$ net_monitor
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 633, in <lambda>
    return (lambda data: callback(*data), user_data)
  File "/usr/bin/net_monitor", line 498, in update
    self.ifaces[iface][widget].set_text(str(value))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 20: ordinal not in range(128)
$

net_monitor shows nothing

--------------------------------------------------------------------------------
After:
$ net_monitor
$

net_monitor now shows something and works.

CC: (none) => geiger.david68210
Whiteboard: MGA4TOO => MGA4TOO MGA4-64-OK

Comment 8 David GEIGER 2014-04-05 19:43:02 CEST
Tested mga4_32,

Testing complete for net_monitor-0.17-1.mga4, Ok for me.
I can also reproduce this bug on French system and I confirm that this bug is fixed with this update too.

Before:
$ net_monitor
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 633, in <lambda>
    return (lambda data: callback(*data), user_data)
  File "/usr/bin/net_monitor", line 498, in update
    self.ifaces[iface][widget].set_text(str(value))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 20: ordinal not in range(128)
$

net_monitor shows nothing

--------------------------------------------------------------------------------
After:
$ net_monitor
$

net_monitor now shows something and works.

Whiteboard: MGA4TOO MGA4-64-OK => MGA4TOO MGA4-64-OK MGA4-32-OK

Comment 9 claire robinson 2014-04-05 20:19:27 CEST
Validating, thanks David and well done Alex.

Advisories should be in a more natural/conversational type of language than the changelog so I uploaded it as below..

----
  net_monitor has been fixed to use str() instead of unicode().

  Previously net_monitor would only work using English locale.
  The update corrects this.
----

Could sysadmin please push to 4 updates

Thanks

Keywords: (none) => validated_update
Whiteboard: MGA4TOO MGA4-64-OK MGA4-32-OK => has_procedure advisory MGA4-64-OK MGA4-32-OK
CC: (none) => sysadmin-bugs

Comment 10 Damien Lallement 2014-04-05 21:43:10 CEST
http://advisories.mageia.org/MGAA-2014-0097.html

Status: REOPENED => RESOLVED
CC: (none) => mageia
Resolution: (none) => FIXED


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