Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to port some pygtk music player code to pygi which uses gst's discoverer module.

from gi.repository import Gst, GstPbutils

def on_discovered(discoverer, ismedia):
    print("%s -- %s" %( discoverer.tags.get('title', 'Unknown'),
                        discoverer.tags.get('artist', 'Unknown')))

location = "file:///srv/Music/molly_hatchet-the_creeper.mp3"
discoverer = GstPbutils.Discoverer()
discoverer.connect('discovered', on_discovered)

When I attempt to run this I get the following error:

/usr/lib/python2.7/dist-packages/gi/ Warning: g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed
  return info.invoke(*args, **kwargs)
/usr/lib/python2.7/dist-packages/gi/ Warning: g_object_ref_sink: assertion `G_IS_OBJECT (object)' failed
  return info.invoke(*args, **kwargs)

** (python:21482): CRITICAL **: pygobject_register_wrapper: assertion `PyObject_TypeCheck(self, &PyGObject_Type)' failed
/usr/lib/python2.7/dist-packages/gi/ Warning: g_object_unref: assertion `G_IS_OBJECT (object)' failed
  return info.invoke(*args, **kwargs)

Unfortunately documentation on this pygi module seems a bit sparse.

For now I've reverted back to pygtk, but I'd love to know how to make this work with pygi since that's going to be the way forward with Ubuntu.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.