GNOME Bugzilla – Bug 790123
Importing Gst from gi.repository fails with gst_uninstalled setup
Last modified: 2017-11-13 14:28:20 UTC
I just setup a new gst-uninstalled environment using: curl https://cgit.freedesktop.org/gstreamer/gstreamer/plain/scripts/create-uninstalled-setup.sh | sh ln -sf ~/gst/master/gstreamer/scripts/gst-uninstalled ~/gst-master echo "Run: ./gstreamer/scripts/git-update.sh" ~/gst-master I run git-update, and after building i check that it works with gst-inspect etc. $ gst-launch-1.0 --version gst-launch-1.0 version 1.13.0 GStreamer 1.13.0 (GIT) Then, from within gst-master, running the following fails: $ cat test.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- from gi.repository import Gst $ python test.py Traceback (most recent call last):
+ Trace 238152
from gi.repository import Gst
dynamic_module = load_overrides(introspection_module)
override_mod = importlib.import_module(override_package_name)
return _bootstrap._gcd_import(name[level:], package, level)
real_functions = [o for o in inspect.getmembers(Gst) if isinstance(o[1], type(Gst.init))]
value = getattr(object, key)
assert g_type == TYPE_NONE AssertionError
For what it's worth, i'm running on Arch, with: * python-gobject 3.26.0 * gst-python 1.12.3 (i also tried with git gst-python built in /home/ubicast/gst/master/gst-python) $ echo $PYTHONPATH :/usr/lib/python3.6/site-packages:/home/ubicast/gst/master/gst-python
That's surprising, have you tried using gst-build ?
Just did, same issue. I'll triple check
I see there is no gst-python being built by gst-build, is it supposed to support this as well in the uninstalled environment ?
Looks like i'm not having the issue on another system, i'll try to find out how it differs.
(In reply to Florent Thiéry from comment #3) > I see there is no gst-python being built by gst-build, is it supposed to > support this as well in the uninstalled environment ? Yes it is, you need to pass -Denable_python=yes at meson build or meson conf time to get it (not sure why this isn't done by default)
gst-python is properly integrated into the gst-build uninstalled env.
Thanks, btw the exect syntax was $ meson build -Denable_python=true
Basically my failing system was missing the gobject-introspection package. Installing it does make it work. 1) how come can i use gstreamer from python without the gobject-introspection package (outside of the uninstalled environment)? My app uses gi and gstreamer, and works without gobject-introspection being installed (but it has python-gobject and gst-python) 2) should not meson complain louder about missing gobject-introspection ? Even drop python being built ?
(In reply to Florent Thiéry from comment #8) > Basically my failing system was missing the gobject-introspection package. > Installing it does make it work. > > 1) how come can i use gstreamer from python without the > gobject-introspection package (outside of the uninstalled environment)? My > app uses gi and gstreamer, and works without gobject-introspection being > installed (but it has python-gobject and gst-python) > If you have the gir, typelib files and pygobject, then you can use these without needing gobject-introspection, which is only a build time dependency for these files > 2) should not meson complain louder about missing gobject-introspection ? Possibly :) > Even drop python being built ? Well the python overrides only depend on the pygobject headers, if you have those then it can build its C extensions