TypeError: userLeft() takes exactly 4 arguments (3 given)

Bug #215939 reported by Siegfried Gevatter on 2008-04-11
2
Affects Status Importance Assigned to Milestone
P1tr
Medium
Michael Otteneder

Bug Description

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/twisted/internet/tcp.py", line 362, in doRead
    return self.protocol.dataReceived(data)
  File "/usr/lib/python2.5/site-packages/twisted/words/protocols/irc.py", line 1478, in dataReceived
    basic.LineReceiver.dataReceived(self, data.replace('\r', ''))
  File "/usr/lib/python2.5/site-packages/twisted/protocols/basic.py", line 232, in dataReceived
    why = self.lineReceived(line)
  File "/usr/lib/python2.5/site-packages/twisted/words/protocols/irc.py", line 1486, in lineReceived
    self.handleCommand(command, prefix, params)
--- <exception caught here> ---
  File "/usr/lib/python2.5/site-packages/twisted/words/protocols/irc.py", line 1498, in handleCommand
    method(prefix, params)
  File "/usr/lib/python2.5/site-packages/twisted/words/protocols/irc.py", line 1010, in irc_PART
    self.userLeft(nick, channel)
exceptions.TypeError: userLeft() takes exactly 4 arguments (3 given)

Chris Ortner (c-ortner) wrote :

http://twistedmatrix.com/documents/current/api/twisted.words.protocols.irc.IRCClient.html#userLeft
According to this userLeft() takes 3 arguments. Your traceback is interesting.

Michael Otteneder (m-otteneder) wrote :

We did not overwrite userLeft() properly. lib.core contains this:
    def userLeft(self, user, channel, reason):
        """Called when someone has to go."""
        for plugin in self.plugins:
            plugin.user_part(self, user, channel, reason)

As you can see our userLeft() really requires 4 parameter.

Changed in p1tr:
assignee: nobody → m-otteneder
importance: Undecided → Medium
milestone: none → beta
status: New → Confirmed
Michael Otteneder (m-otteneder) wrote :

fixed in revision 106

Changed in p1tr:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers