GNOME Bugzilla – Bug 757323
Invalid TypeError when GError is passed as an argument
Last modified: 2016-01-23 04:07:14 UTC
I encountered a bug when trying to use "Gst.Message.new_error(src, error, debug)" binding for "gst_message_new_error(src, error, debug)" function. It throws TypeError complaining about number of parameters - when I pass correct 3 parameters, it says it needs 2, and when I pass 2, it says it wants 3: >>> 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):
+ Trace 235656
TypeError: new_error() takes exactly 2 arguments (3 given) >>> e = Gst.Message.new_error(o, None) Traceback (most recent call last):
TypeError: new_error() takes exactly 3 argument(s) (2 given)
The problem is probably caused by the second parameter, which is GLib.Error
I can see that nobody replied. Did I not provide enough information? I'd gladly add anything else, which may be needed, because as of this moment, not only is there NO WAY of creating Gst.Message.new_error, but I'd say there could be other problems when handling GError in python binding.
(In reply to Jan Spurny from comment #1) > I can see that nobody replied. Did I not provide enough information? The bug report looks good, thanks.
*** This bug has been marked as a duplicate of bug 685197 ***