[Tutor] An attribute error problem

Kent Johnson kent37 at tds.net
Tue Mar 29 03:25:38 CEST 2005


Kevin wrote:
> Here is the entire error message:
> 
> Traceback (most recent call last):
>   File "C:\Documents and Settings\Kevin\Desktop\New
> Folder\mudmaker\mmaker.py", line 55, in ?
>     server.checkConnections(0.1)
>   File "C:\Documents and Settings\Kevin\Desktop\New
> Folder\mudmaker\sServer.py", line 73, in checkConnections
>     self.closeConnection((self, f))

The line above is exactly the line I suggested you change (see below). It doesn't look like you did. 
Did you understand my suggestion? Are you able to change the file?

Kent

>   File "C:\Documents and Settings\Kevin\Desktop\New
> Folder\mudmaker\sServer.py", line 49, in closeConnection
>     self.removeConnection((self, conn))
>   File "C:\Documents and Settings\Kevin\Desktop\New
> Folder\mudmaker\sServer.py", line 42, in removeConnection
>     self._descriptors.remove(conn._fd)
> AttributeError: 'tuple' object has no attribute '_fd'
> 
> 
> On Mon, 28 Mar 2005 14:06:49 -0500, Kent Johnson <kent37 at tds.net> wrote:
> 
>>Kevin wrote:
>>
>>>Nope it will still give the same Attribute error.
>>
>>Please post the entire error including the stack trace and the whole error message. Copy and paste
>>the whole thing, don't transcribe it.
>>
>>Kent
>>
>>
>>>
>>>On Mon, 28 Mar 2005 13:50:07 -0500, Kent Johnson <kent37 at tds.net> wrote:
>>>
>>>
>>>>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
>>>>
>>>>_______________________________________________
>>>>Tutor maillist  -  Tutor at python.org
>>>>http://mail.python.org/mailman/listinfo/tutor
>>>>
>>>
>>>
>>_______________________________________________
>>Tutor maillist  -  Tutor at python.org
>>http://mail.python.org/mailman/listinfo/tutor
>>
> 
> 



More information about the Tutor mailing list