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 757323 - Invalid TypeError when GError is passed as an argument
Invalid TypeError when GError is passed as an argument
Status: RESOLVED DUPLICATE of bug 685197
Product: pygobject
Classification: Bindings
Component: general
3.14.x
Other Linux
: Normal critical
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-29 16:09 UTC by Jan Spurny
Modified: 2016-01-23 04:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jan Spurny 2015-10-29 16:09:21 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):
  • 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)


The problem is probably caused by the second parameter, which is GLib.Error
Comment 1 Jan Spurny 2015-11-18 11:14:24 UTC
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.
Comment 2 Christoph Reiter (lazka) 2015-11-19 11:17:02 UTC
(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.
Comment 3 Simon Feltman 2016-01-23 04:07:14 UTC

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