[Tutor] An attribute error problem
Kent Johnson
kent37 at tds.net
Mon Mar 28 20:50:07 CEST 2005
Kevin wrote:
> Hi,
>
> I fond this game on the internet I was able to fix most of the errors
> that it was giving and it will
> now start up ok. However when you try to enter a name to login to the
> game it will crash and
> give this:
>
> in sServer.py
> line 42, in removeConnection
> self._descriptors.remove(conn._fd)
> AttributeError: 'tuple' object has no attribute '_fd'
>
> How would I go about fixing this.
This error is because the caller is passing the wrong kind of argument to removeConnection. It seems
to expect a connection object but it is getting a tuple instead.
My guess is the error is the line
self.closeConnection((self, f))
in checkConnections(). The argument is (self, f) which is a tuple. Maybe it should be
self.closeConnection(self._connections[f]) ??
> I have uploaded to entire game to http://lotheria.com/mudmaker.zp if
> anyone would care to
> take a look at it.
That should be http://lotheria.com/mudmaker.zip
Kent
More information about the Tutor
mailing list