python binding - Gst.Message.new_error doesn't know how many arguments it wants

Thibault Saunier tsaunier at gnome.org
Thu Oct 29 07:39:13 PDT 2015


Hello,

I confirm there is a bug here, and I have the feeling that it is in
PyGObject which getting messed up because of the GError which it does
not know how to deal with (usually GError are out arguments and are
used by PyGObject to throw exceptions).

Please open a bug report :)

Regards,

Thibault

On Thu, Oct 29, 2015 at 12:56 PM, Jan Spurný <JSpurny at seznam.cz> wrote:
> Hi,
>
> I encountered really weird behaviour of Gst.Message.new_error - according to
> documentation, it should accept 3 arguments - src, error and debug. But if I
> pass 3 arguments, it throws an exception complaining that it needs 2
> arguments. When I pass 2 arguments, it suddenly wants 3. I'm stuck, because I
> can't use it.
>
> This is how to reproduce the behaviour:
>
>>>> import gi
>>>> gi.require_version('Gst', '1.0')
>>>> from gi.repository import Gst
>>>> Gst.init(None)
> []
>>>> o = Gst.ElementFactory.make('fakesink')
>>>> e = Gst.Message.new_error(o, None, None)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: new_error() takes exactly 2 arguments (3 given)
>>>> e = Gst.Message.new_error(o, None)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: new_error() takes exactly 3 argument(s) (2 given)
>>>>
>
> Debian Linux 8.2 amd64, python2.7, gstreamer 1.4.4.0
>
> Am I doing something wrong or am I forgetting something?
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list