software-properties-gtk complains about Gdk being imported without a version

Bug #1576193 reported by Jonathan Kamens on 2016-04-28
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Low
Unassigned

Bug Description

jik@jik5:~$ software-properties-gtk &
[1] 6387
jik@jik5:~$ /usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: 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 GObject, Gdk, Gtk, Gio, GLib

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: software-properties-gtk 0.96.20
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Apr 28 08:42:25 2016
InstallationDate: Installed on 2016-01-16 (103 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
PackageArchitecture: all
SourcePackage: software-properties
UpgradeStatus: Upgraded to xenial on 2016-04-28 (0 days ago)

Jonathan Kamens (jik) wrote :
Changed in software-properties (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Jerry Bezencon (valtam) wrote :

I can confirm this error on Linux Lite 3.0 (Ubuntu 16.04 base):

jerry@jerry-vb-32:~$ software-properties-gtk
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: 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 GObject, Gdk, Gtk, Gio, GLib
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: 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 GObject, Gdk, Gtk, Gio, GLib
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
jerry@jerry-vb-32:~$

Miloš Pavlović (mpsrv) wrote :

It's just Gtk complaining but it should continue running regardless. This will remove the warning.Look in the attach.
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py

Miloš Pavlović (mpsrv) wrote :

Not sure how to send a patch, I'm used to git
This is all new to me :)

What I did was to add next lines in "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py"

from gi import require_version
require_version('Gtk', '3.0')
require_version('Gdk', '3.0')

before the next line

from gi.repository import GObject, Gdk, Gtk, Gio, GLib

alextoind (alextoind) wrote :

Thanks for the fix @Miloš Pavlović!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers