Bug 1082469

Summary: python3-gobject: AttributeError: 'ActionGroup' object has no attribute 'add_actions'
Product: [openSUSE] openSUSE Tumbleweed Reporter: Sebastian Schubert <schubert.seb>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dimstar, schubert.seb
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Sebastian Schubert 2018-02-23 06:41:59 UTC
I get the the error "AttributeError: 'ActionGroup' object has no attribute 'add_actions'" when executing the following code with python3:

Python 3.6.4 (default, Jan 03 2018, 13:52:55) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gtk
__main__:1: 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.
>>> g = Gtk.ActionGroup()
>>> g.add_actions(['test'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'ActionGroup' object has no attribute 'add_actions'

This produces problems with e.g. Gramps ( https://gramps-project.org/bugs/view.php?id=10423 ). I have an up-to-date Tumbleweed system with python3-gobject-3.26.1-1.1.
Comment 1 Dominique Leuenberger 2018-02-28 11:23:23 UTC
That will turn out to be fun:

> python3
Python 3.6.4 (default, Jan 03 2018, 13:52:55) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gtk
__main__:1: 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.
>>> g = Gtk.ActionGroup()
>>> g.add_actions(['test'])
>>> 

My first idea would be that you're missing python3-gobject-Gdk; can you please verify?
Comment 2 Sebastian Schubert 2018-02-28 17:42:54 UTC
Yes, exactly: installing python3-gobject-Gdk solved the issue. Thus, this package should be pulled in when installing e.g. Gramps.
Comment 3 Dominique Leuenberger 2018-02-28 18:13:54 UTC
(In reply to Sebastian Schubert from comment #2)
> Yes, exactly: installing python3-gobject-Gdk solved the issue. Thus, this
> package should be pulled in when installing e.g. Gramps.

Correct - a missed dependency. Do you want to take care of it? Otherwise I'll add of course
Comment 4 Dominique Leuenberger 2018-02-28 19:24:53 UTC
Fix is submitted to the devel project; I had to touch gramps anyway.