[pygtk] PyGObject timeout_add error
Timo
timomlists at gmail.com
Sat Oct 16 20:20:43 WST 2010
Hello,
Before porting my main project to PyGObject, I am writing a little
application first.
The problem is that I get an error when calling GLib.timeout_add() and I
can't figure out what's wrong.
This is a minimal example:
import pygtk
pygtk.require('2.0')
from gi.repository import Gtk, GLib
def update():
print "Update!"
return True
GLib.timeout_add(3000, update)
And the error message:
** (timeout_test.py:9304): CRITICAL **: g_arg_info_is_caller_allocates:
assertion `info != NULL' failed # This repeats 5 times
Traceback (most recent call last):
File "timeout_test.py", line 9, in <module>
GLib.timeout_add(3000, update)
File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/types.py", line 40, in
function
return info.invoke(*args)
TypeError: Error invoking GLib.timeout_add: Invalid callback given for
argument function
This running on Ubuntu 10.10 with Python 2.6.6 and PyGobject 2.21.5
Cheers,
Timo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20101016/bd1b126d/attachment.html>
More information about the pygtk
mailing list