Bug 16845 - network monitor does not display graph of traffic data (python3 regression)
Summary: network monitor does not display graph of traffic data (python3 regression)
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 16748
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-28 09:49 CEST by Ben McMonagle
Modified: 2015-10-03 04:25 CEST (History)
2 users (show)

See Also:
Source RPM: net_monitor-0.21, python3-cairo
CVE:
Status comment:


Attachments
image of network monitor with no graph shown (30.52 KB, image/png)
2015-09-28 09:50 CEST, Ben McMonagle
Details
fix shebang (524 bytes, patch)
2015-09-29 10:42 CEST, Thierry Vignaud
Details | Diff
fix import warnings with latest gi (631 bytes, patch)
2015-09-29 10:42 CEST, Thierry Vignaud
Details | Diff
fix "argument for 's' must be a bytes object" (1.20 KB, patch)
2015-09-29 10:42 CEST, Thierry Vignaud
Details | Diff
fix "ord() expected string of length 1, but int found" (948 bytes, patch)
2015-09-29 10:42 CEST, Thierry Vignaud
Details | Diff
do not unset IP if we can't retrieve the MAC one (771 bytes, patch)
2015-09-29 10:45 CEST, Thierry Vignaud
Details | Diff
fix "ord() expected string of length 1, but int found" (897 bytes, text/plain)
2015-09-29 10:51 CEST, Thierry Vignaud
Details
use six for queue/Queue in order to ease python[23] run comparaisons (247 bytes, patch)
2015-09-30 14:44 CEST, Thierry Vignaud
Details | Diff

Description Ben McMonagle 2015-09-28 09:49:08 CEST
Description of problem: with LXDE, when using "network monitor" no graph is displayed to indicate the short history of upload / download data rate. however traffic statistics or displayede as normal


Version-Release number of selected component (if applicable):


How reproducible:every time network monitor is launched


Steps to Reproduce:
1.login to LXDE and run update to latest packages
2.start network monitor
3.observe traffic statistics but no graph is displayed


Reproducible: 

Steps to Reproduce:
Comment 1 Ben McMonagle 2015-09-28 09:50:20 CEST
Created attachment 7060 [details]
image of network monitor with no graph shown
Comment 2 Samuel Verschelde 2015-09-28 09:56:20 CEST
Does it work in other Desktop Environments? Does it output errors when started from console?

Source RPM: (none) => net_monitor
Whiteboard: (none) => NEEDINFO

Comment 3 David Walser 2015-09-28 17:55:27 CEST
Is vnstat installed?  Is the vnstat service running?
Comment 4 Ben McMonagle 2015-09-29 07:42:18 CEST
(In reply to Samuel VERSCHELDE from comment #2)
> Does it work in other Desktop Environments?

affected desktops: xfce, lxde, mate, cinnamon,Kde plasma.

>Does it output errors when started from console?

response from terminal:
*****@localhost ~]$ net_monitor
/bin/net_monitor:4: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gdk
/bin/net_monitor:6: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Comment 5 Ben McMonagle 2015-09-29 07:46:39 CEST
(In reply to David Walser from comment #3)
> Is vnstat installed?

vnstat 1.14-1.mga6 is installed

> Is the vnstat service running?

please advise terminal query, thanks
Comment 6 Thierry Vignaud 2015-09-29 10:41:39 CEST
This is a regression from the switch from python2 to python3 
Downgrading to python3 works fine

Draw signal is no more fired, which is very strange...

BTW I've noted some defects in the python3 switch that I'll push later.

CC: (none) => thierry.vignaud, yves.brungard_mageia
Hardware: i586 => All
Summary: network monitor does not display graph of traffic data => network monitor does not display graph of traffic data (python3 regression)
Source RPM: net_monitor => net_monitor-0

Thierry Vignaud 2015-09-29 10:41:47 CEST

Source RPM: net_monitor-0 => net_monitor-0.21

Comment 7 Thierry Vignaud 2015-09-29 10:42:15 CEST
Created attachment 7065 [details]
fix shebang
Comment 8 Thierry Vignaud 2015-09-29 10:42:28 CEST
Created attachment 7066 [details]
fix import warnings with latest gi
Comment 9 Thierry Vignaud 2015-09-29 10:42:41 CEST
Created attachment 7067 [details]
fix "argument for 's' must be a bytes object"
Comment 10 Thierry Vignaud 2015-09-29 10:42:56 CEST
Created attachment 7068 [details]
fix "ord() expected string of length 1, but int found"
Comment 11 Thierry Vignaud 2015-09-29 10:45:25 CEST
Created attachment 7069 [details]
do not unset IP if we can't retrieve the MAC one
Comment 12 Thierry Vignaud 2015-09-29 10:51:44 CEST
Created attachment 7070 [details]
fix "ord() expected string of length 1, but int found"

better fix (previous patch would display a bogus MAC address)

Attachment 7068 is obsolete: 0 => 1

Comment 13 Thierry Vignaud 2015-09-29 11:44:18 CEST
LoadGUI.update does run queue_draw_aread() regularly but the handler for the "draw" signal is never called.
There's nothing obvious in diff between 0.20 & 0.21
Thierry Vignaud 2015-09-29 11:44:52 CEST

Whiteboard: NEEDINFO => (none)

Comment 14 Thierry Vignaud 2015-09-30 14:44:05 CEST
All patches were applied.
With next patch, it's easy to see that python2 net_monitor/net_monitor does display graphes, whereas it doesn't with python3
This it's a fallout of python3 conversion (aka bug #16748)

Depends on: (none) => 16748

Comment 15 Thierry Vignaud 2015-09-30 14:44:43 CEST
Created attachment 7073 [details]
use six for queue/Queue in order to ease python[23] run comparaisons

(NOT TO BE COMMIT)
Comment 16 Thierry Vignaud 2015-09-30 14:54:20 CEST
With the gtk inspector, the only difference I saw is that there's no unmap signal handler with python3, which means the drawingarea is not realized IMHO
Comment 17 Thierry Vignaud 2015-09-30 15:56:16 CEST
Though, on exit with python3, there's the following warnings:

TypeError: can't convert return value to desired type
net_monitor/net_monitor:884: Warning: g_value_get_boolean: assertion 'G_VALUE_HOLDS_BOOLEAN (value)' failed
  Gtk.main()
net_monitor/net_monitor:884: Warning: g_value_reset: assertion 'G_IS_VALUE (value)' failed
  Gtk.main()
net_monitor/net_monitor:884: Warning: g_value_unset: assertion 'G_IS_VALUE (value)' failed
  Gtk.main()
Comment 18 Ben McMonagle 2015-10-02 08:43:39 CEST
thanks for looking into this Thierry.
Comment 19 Thierry Vignaud 2015-10-02 14:34:49 CEST
I found out what's the issue.
The real issue is within python3-cairo: __init__.py is wrongly in a src/ subdirectory...

Assignee: bugsquad => thierry.vignaud
Source RPM: net_monitor-0.21 => net_monitor-0.21, python3-cairo

Comment 20 Thierry Vignaud 2015-10-02 17:34:52 CEST
Fixed in package

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

Comment 21 Ben McMonagle 2015-10-03 04:25:36 CEST
todays update  has fixed issue.

thanks again Thierry.

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