Crash on startup: TypeError: getattr(): attribute name must be string

Bug #830634 reported by maxx
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GNOME Activity Journal
Zeitgeist Framework
Fix Released
Siegfried Gevatter
gnome-activity-journal (Fedora)
Fix Released

Bug Description

The bug was first reported here:

It is still happening with the latest 0.8.0 release of gnome-activity-journal as well as a current checkout from bzr. This is with zeitgeist 0.8.1.

The full output when attempting to run gnome-activity-journal is:

Traceback (most recent call last):
  File "/usr/bin/gnome-activity-journal", line 88, in <module>
    from src.external import CLIENT, CLIENT_VERSION
  File "/usr/share/gnome-activity-journal/src/", line 88, in <module>
    CLIENT_VERSION = CLIENT.get_version()
  File "/usr/lib/python2.7/site-packages/zeitgeist/", line 450, in get_version
    return [int(i) for i in self._iface.version()]
  File "/usr/lib/python2.7/site-packages/zeitgeist/", line 207, in version
    self.INTERFACE_NAME, "version")
  File "/usr/lib/python2.7/site-packages/zeitgeist/", line 105, in _disconnection_safe
    meth = getattr(self.__iface, method_name)
TypeError: getattr(): attribute name must be string

Changed in gnome-activity-journal:
importance: Undecided → Medium
milestone: none → 0.8.1
status: New → Confirmed
Revision history for this message
Martijn Faassen (faassen) wrote :

A pdb shows that method_name is a dbus.proxies._ProxyMethod. This seems to be a callable itself.

I think there's another bug lurking here though, as the meth it tries to getattr is never actually used. Maybe it should be returned? Not knowing what is really going on I tried various things, but to no avail - I only get crashes later on
in get_version.

Revision history for this message
Martijn Faassen (faassen) wrote :

Maybe the getattr without results is intentional; I see some __getattr__ hacking in this class. I'd get rid of that __getattr__ if I were you, as it's likely to invite more hard to debug issues.

Revision history for this message
Martijn Faassen (faassen) wrote :

Okay, I hacked my way into getting a GUI. Here's my hack around line 105 (the place of the original traceback). Replace the line:

                       meth = getattr(self.__iface, method_name)

with this:

                        import dbus.proxies
                        if not isinstance(method_name, dbus.proxies._ProxyMethod):
                            meth = getattr(self.__iface, method_name)
                            meth = method_name
                        return meth(*args, **kwargs)

this along with the scary __getattr__ (which is already there but which I criticized before) will make things work at least enough to make the GUI appear on Fedora 15.

I'm not proposing this as a real patch, as I have no idea what I'm doing. I have the feeling that there was a slow accumulation of magic in this class probably intended to make programming easier, but now pretty scary to me (and leading to odd bugs like this).

Revision history for this message
Siegfried Gevatter (rainct) wrote :


This problem is fixed in Zeitgeist (the particular commit, in case you're curious, is

Changed in zeitgeist:
assignee: nobody → Siegfried Gevatter (rainct)
status: New → Fix Released
Changed in gnome-activity-journal:
milestone: 0.8.1 → none
Changed in gnome-activity-journal (Fedora):
importance: Unknown → Undecided
status: Unknown → 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.