Discussion:
[Bug 790123] New: Importing Gst from gi.repository fails with gst_uninstalled setup
"GStreamer" (GNOME Bugzilla)
2017-11-09 14:59:07 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

Bug ID: 790123
Summary: Importing Gst from gi.repository fails with
gst_uninstalled setup
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-python
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@ubicast.eu
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---

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):
File "test.py", line 3, in <module>
from gi.repository import Gst
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 646, in _load_unlocked
File "<frozen importlib._bootstrap>", line 616, in _load_backward_compatible
File "/usr/lib/python3.6/site-packages/gi/importer.py", line 146, in
load_module
dynamic_module = load_overrides(introspection_module)
File "/usr/lib/python3.6/site-packages/gi/overrides/__init__.py", line 125,
in load_overrides
override_mod = importlib.import_module(override_package_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/lib/python3.6/site-packages/gi/overrides/Gst.py", line 581, in
<module>
real_functions = [o for o in inspect.getmembers(Gst) if isinstance(o[1],
type(Gst.init))]
File "/usr/lib/python3.6/inspect.py", line 342, in getmembers
value = getattr(object, key)
File "/usr/lib/python3.6/site-packages/gi/module.py", line 154, in
__getattr__
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
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-09 15:15:37 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

Mathieu Duponchelle <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com

--- Comment #1 from Mathieu Duponchelle <***@gmail.com> ---
That's surprising, have you tried using gst-build ?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-09 16:11:14 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

--- Comment #2 from Florent Thiéry <***@ubicast.eu> ---
Just did, same issue. I'll triple check
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-09 16:14:42 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

--- Comment #3 from Florent Thiéry <***@ubicast.eu> ---
I see there is no gst-python being built by gst-build, is it supposed to
support this as well in the uninstalled environment ?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-09 16:41:37 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

--- Comment #4 from Florent Thiéry <***@ubicast.eu> ---
Looks like i'm not having the issue on another system, i'll try to find out how
it differs.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-09 17:50:46 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

--- Comment #5 from Mathieu Duponchelle <***@gmail.com> ---
(In reply to Florent Thiéry from comment #3)
Post by "GStreamer" (GNOME Bugzilla)
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)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-09 17:59:32 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

Thibault Saunier <***@gnome.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gnome.org

--- Comment #6 from Thibault Saunier <***@gnome.org> ---
gst-python is properly integrated into the gst-build uninstalled env.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-10 10:48:28 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

--- Comment #7 from Florent Thiéry <***@ubicast.eu> ---
Thanks, btw the exect syntax was

$ meson build -Denable_python=true
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-10 16:54:50 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

--- Comment #8 from Florent Thiéry <***@ubicast.eu> ---
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 ?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-10 16:57:07 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

Florent Thiéry <***@ubicast.eu> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-11 03:09:40 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

Matthew Waters (ystreet00) <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
Resolution|FIXED |NOTABUG
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-11-13 14:28:20 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=790123

--- Comment #9 from Mathieu Duponchelle <***@gmail.com> ---
(In reply to Florent Thiéry from comment #8)
Post by "GStreamer" (GNOME Bugzilla)
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
Post by "GStreamer" (GNOME Bugzilla)
2) should not meson complain louder about missing gobject-introspection ?
Possibly :)
Post by "GStreamer" (GNOME Bugzilla)
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
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...