After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726493 - Gst overrides do not work on Python 3.3, but do on Python 2.7
Gst overrides do not work on Python 3.3, but do on Python 2.7
Status: RESOLVED DUPLICATE of bug 726921
Product: GStreamer
Classification: Platform
Component: gst-python
1.2.0
Other Linux
: Normal critical
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-17 07:59 UTC by Simon Farnsworth
Modified: 2014-04-26 08:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon Farnsworth 2014-03-17 07:59:37 UTC
I'm only loosely testing this, as part of Fedora packaging of gst-python; I'm using http://bazaar.launchpad.net/~jderose/+junk/gst-examples/view/head:/video-player-1.0 as my test script, with "filename" on line 15 suitably altered.

If I run this as "python2 video-player-1.0", it works fine with gst-python 1.2.0 installed. If I run it as "python3" video-player-1.0", I get a traceback in the Gst overrides:

Traceback (most recent call last):
  • File "video-player-1.0", line 79 in <module>
    p = Player();
  • File "video-player-1.0", line 29 in __init__
    self.pipeline = Gst.Pipeline()
  • File "/usr/lib64/python3.3/site-packages/gi/overrides/Gst.py", line 173 in __init__
    Gst.Pipeline.__init__(self, name=name)
AttributeError: 'NoneType' object has no attribute 'Pipeline'

Comment 1 Tim-Philipp Müller 2014-03-21 14:36:56 UTC
This seems pretty major.. (confirmed on debian with python3-gst-1.0 package from experimental as well, on IRC).
Comment 2 ticapix 2014-03-21 14:39:18 UTC
I encountered the same problem with this code:	
    #!/usr/bin/env python3
     
    import gi
    gi.require_version('Gst', '1.0')
    from gi.repository import Gst
    print(Gst.version())     
    src = Gst.ElementFactory.make('filesrc', None)
     
Stacktrace     
    $./gst01.py
    (1, 2, 3, 0)
    Traceback (most recent call last):
  • File "./gst01.py", line 8 in <module>
    src = Gst.ElementFactory.make('filesrc', None)
  • File "/usr/lib/python3/dist-packages/gi/overrides/Gst.py", line 166 in make
    return Gst.ElementFactory.make(factory_name, instance_name)     AttributeError: 'NoneType' object has no attribute 'ElementFactory'     \$


Solved it by removing the package python3-gst-1.0 and only keeping python3-gi + gir1.2-gstreamer-1.0.
Comment 3 Gilles Dartiguelongue 2014-04-26 00:39:27 UTC
This stops gnome-music from starting as well here on Gentoo.
Comment 4 Thibault Saunier 2014-04-26 07:05:53 UTC
It should have been fixed with the fix for: https://bugzilla.gnome.org/show_bug.cgi?id=726921 could you check the latest 1.2 branch, and I will release 1.2.1 when someone confirms it is fixed there.
Comment 5 Sebastian Dröge (slomo) 2014-04-26 08:16:20 UTC
Note that it also works with Python 3.4 without any changes... but this is indeed a dup of bug #726921. I can confirm this here with Python 3.3.

*** This bug has been marked as a duplicate of bug 726921 ***