Comment 1 for bug 709240

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

With the latest round of Dbusmenu fixes and libunity-3.4.2 I can actually do in python:

from gi.repository import Unity
dir(Unity)

But whenever I try and use any of the classes there I get some odd errors. Eg.

>>> appman = Unity.AppInfoManager.get_instance()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/gi/module.py", line 263, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/pymodules/python2.7/gi/module.py", line 160, in __getattr__
    wrapper = metaclass(name, bases, dict_)
  File "/usr/lib/pymodules/python2.7/gi/types.py", line 226, in __init__
    set_object_has_new_constructor(cls.__info__.get_g_type())
TypeError: must be a subtype of GObject

or

>>> dir(Unity.LauncherEntry)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/gi/module.py", line 263, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/pymodules/python2.7/gi/module.py", line 136, in __getattr__
    interfaces = tuple(interface for interface in get_interfaces_for_object(info)
  File "/usr/lib/pymodules/python2.7/gi/module.py", line 76, in get_interfaces_for_object
    interfaces.append(getattr(module, name))
  File "/usr/lib/pymodules/python2.7/gi/module.py", line 263, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/pymodules/python2.7/gi/module.py", line 160, in __getattr__
    wrapper = metaclass(name, bases, dict_)
  File "/usr/lib/pymodules/python2.7/gi/types.py", line 228, in __init__
    register_interface_info(cls.__info__.get_g_type())
TypeError: must be an interface

I will look into it