I am trying to port some pygtk music player code to pygi which uses the gst 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'))) Gst.init(None) location = "file:///srv/Music/molly_hatchet-the_creeper.mp3" discoverer = GstPbutils.Discoverer() discoverer.discover_uri(location) discoverer.connect('discovered', on_discovered)
When I try to run this, I get the following error:
/usr/lib/python2.7/dist-packages/gi/types.py:43: Warning: g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed return info.invoke(*args, **kwargs) /usr/lib/python2.7/dist-packages/gi/types.py:43: 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/types.py:43: Warning: g_object_unref: assertion `G_IS_OBJECT (object)' failed return info.invoke(*args, **kwargs)
Unfortunately, the documentation for this pygi module seems a bit sparse.
source share