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 625095 - confusing error message when the function accepts callbacks as args
confusing error message when the function accepts callbacks as args
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-23 08:04 UTC by Lucian
Modified: 2010-07-27 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make error message less ambiguous (1.11 KB, patch)
2010-07-25 17:34 UTC, Tomeu Vizoso
committed Details | Review

Description Lucian 2010-07-23 08:04:34 UTC
def l_cb():
    print 'hello'

GLib.timeout_add(100, l_cb)

TypeError: Error invoking GLib.timeout_add: Invalid callback given for argument function


Same thing happens with other functions for setting callbacks in GLib, like idle_add.

I'm using pygi 0.6.0.
Comment 1 Tomeu Vizoso 2010-07-25 17:34:00 UTC
Created attachment 166528 [details] [review]
Make error message less ambiguous

The problem is that timeout_add when accessed through introspection has an additional
priority argument (because it is really timeout_add_full).
Comment 2 johnp 2010-07-26 09:43:26 UTC
Comment on attachment 166528 [details] [review]
Make error message less ambiguous

Accepting this with the note that we should refactor invoke to have a better parameter checking pipeline at some point.
Comment 3 Tomeu Vizoso 2010-07-26 11:49:51 UTC
Attachment 166528 [details] pushed as 890c323 - Make error message less ambiguous
Comment 4 Lucian 2010-07-27 13:39:44 UTC
Then I suppose the bug is in GLib's introspection data, it should expose both timeout_add and timeout_add_full.