Gajim idling error
Just stumbled upon a small bug in Debian’s version of Gajim (0.15.4-2 – currently in testing and sid).
The following error occurs when Gajim starts to idle:
Traceback (most recent call last):
File "/usr/share/gajim/src/common/xmpp/idlequeue.py", line 533, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/share/gajim/src/common/xmpp/idlequeue.py", line 394, in _process_events
obj.pollin()
File "/usr/share/gajim/src/common/xmpp/transports_nb.py", line 420, in pollin
self._do_receive()
File "/usr/share/gajim/src/common/xmpp/transports_nb.py", line 606, in _do_receive
self._on_receive(received)
File "/usr/share/gajim/src/common/xmpp/transports_nb.py", line 620, in _on_receive
self.on_receive(data)
File "/usr/share/gajim/src/common/xmpp/dispatcher_nb.py", line 488, in dispatch
handler['func'](session, stanza)
File "/usr/share/gajim/src/common/connection_handlers.py", line 2009, in _StreamCB
conn=self, stanza=obj))
NameError: global name 'obj' is not defined
This results in a dis- and a subsequent reconnection. As the traceback already suggests the error can be found in /usr/share/gajim/src/common/connection_handlers.py
on line 2009. This is the corresponding function:
def _StreamCB(self, con, iq_obj):
log.debug('StreamCB')
gajim.nec.push_incoming_event(StreamReceivedEvent(None,
conn=self, stanza=obj))
Obviously, there is no variable obj
: The passed argument is called iq_obj
…
To fix that mistake just substitute the function definition with (replace iq_obj
→ obj
in line 2006):
def _StreamCB(self, con, obj):
log.debug('StreamCB')
gajim.nec.push_incoming_event(StreamReceivedEvent(None,
conn=self, stanza=obj))
This bug is already fixed in their repository (13861:239ec662de5a). Thus, this article is mainly for people not familiar with python/programming, who need a quick fix. (wasn’t able to find something on the Internet)
Btw. I’m not sure why, but this error just affected one of my four machines which are running Gajim.
- bug (6) ,
- debian (39) ,
- fix (13) ,
- gajim (1) ,
- jabber (4) ,
- network (81) ,
- programming (75) ,
- snippet (13)
Leave a comment
There are multiple options to leave a comment: