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
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/