Various PyGIWarning on gtk3 version of Terminator

Bug #1513596 reported by pd5rm
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Radiotray
New
Undecided
Unassigned
Terminator
Fix Released
Low
Stephen Boddy

Bug Description

I'm on Arch and was trying the gtk3 version via the terminator-gtk3-bzr package.

I get the following warnings on startup. If I patch the code as suggested, I get no more warnings.

/usr/bin/terminator:32: 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, Gdk

/usr/lib/python2.7/site-packages/terminatorlib/config.py:83: PyGIWarning: GConf was imported without specifying a version first. Use gi.require_version('GConf', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import GConf

Here's the C versions of those libraries:
local/gtk3 3.18.2-1
local/gconf 3.2.6-3

It's unclear to me whether it's looking for the Python or C versions of these.

Related branches

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

These warnings must be something added to later version of the Python GI implementation. I'll add the appropriate lines.

FYI, the libraries are one and the same for C and Python. What changes with GI (versus the old pygtk) is that specific bindings do not have to be created for Python. The library has a .gir file (i.e. /usr/share/gir-1.0/Gtk-3.0.gir) that describes the library classes and methods. The Python GI uses this to interface with the library. this is much improved over pygtk, because as I recall one guy was struggling to keep them up to date.

Changed in terminator:
assignee: nobody → Stephen Boddy (stephen-j-boddy)
importance: Undecided → Low
Changed in terminator:
status: New → In Progress
Revision history for this message
pd5rm (pd5rm) wrote :

Stephen,

Thank you for the detailed writeup of how things work under the hood.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Fixed in rev 1618

Changed in terminator:
status: In Progress → Fix Committed
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :
Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

@stephen-j-boddy

Stephen, can you also fix this in RadioTray? See here:
https://bugs.launchpad.net/ubuntu/+source/radiotray/+bug/1557115

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

@ Lonnie

As you can see from the commit for Terminator the fix is trivially easy:
http://bazaar.launchpad.net/~gnome-terminator/terminator/gtk3/revision/1618

The RadioTray is not a project I'm involved with, and is hosted outside of Launchpad
[Project] http://radiotray.sourceforge.net/
[Bugs] https://bitbucket.org/carlmig/radio-tray/issues
[Source] https://bitbucket.org/carlmig/radio-tray/src/c0e5087963c5cf6332fbb62d3cc9b2e4c270562c?at=default

(Ignore the homepage which points to an old out -of date gtk2 version in sourceforge mercurial repository, the code is in bitbucket)

I suggest you raise a ticket there.

Revision history for this message
The Powerpuff Girls (thepowerpuffgirls) wrote :

I'm having the same issue.

Earlier, I've noticed some installed apps weren't appearing in the launch. The noticeable one was Unity Tweak Tool, so I typed it in the Terminal to see if it'll launch, which it did but also gave an error:
"/usr/lib/python3/dist-packages/UnityTweakTool/__init__.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 Gtk"

It appears to that something, like the Gtk isn't configured properly, or not configured at all and doesn't know which one to choose.
I have two folders, gtk2 and gtk3 in my home folder. It appears I have two installed (which were most likely installed with a fresh install of Xenial) which is causing the conflict.

PS: The Unity Tweak Tool, now shows up in the launch; I'm not sure what was changed, but a few things that weren't showing before, are now. My guess is installing extra packages for apps may have fixed them?

- Blossom.

Revision history for this message
The Powerpuff Girls (thepowerpuffgirls) wrote :
Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.