GNOME Bugzilla – Bug 625095
confusing error message when the function accepts callbacks as args
Last modified: 2010-07-27 13:39:44 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.
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 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.
Attachment 166528 [details] pushed as 890c323 - Make error message less ambiguous
Then I suppose the bug is in GLib's introspection data, it should expose both timeout_add and timeout_add_full.