[pygtk] TypeError when emitting a signal, same code used to work previously

François Ingelrest athropos at gmail.com
Thu Oct 11 19:31:56 WST 2007


Hi,

I've created a new signal:

signal_new('extlistview-dnd', gtk.TreeView, SIGNAL_RUN_LAST,
TYPE_NONE, (gdk.DragContext, TYPE_INT, TYPE_INT, gtk.SelectionData,
TYPE_INT, TYPE_LONG))

Whenever I want to emit that signal, I get a TypeError:

Traceback (most recent call last):
  File "/home/ingelres/Projects/Decibel/branches/0.06/src/gui/extListview.py",
line 550, in onDragDataReceived
    else:                          self.emit('extlistview-dnd',
context, int(x), int(y), selection, dndId, time)
  File "/usr/lib/python2.5/warnings.py", line 62, in warn
    globals)
  File "/usr/lib/python2.5/warnings.py", line 83, in warn_explicit
    for item in filters:
TypeError: could not convert type long to (null) required for parameter 5

"time" is of type long, as expected. If I replace it by a an int,
everything works.

I recently upgraded to the latest Ubuntu Gusty, and I guess this code
stopped working at that point, because it used to work previously and
I didn't modify it. I've even tried to use previous (working) versions
of my code, and I get the same error.

Anybody knows if this is something that has changed in recent PyGTK?


More information about the pygtk mailing list