On 27/01/06, Bob Hinkle <[EMAIL PROTECTED]> wrote:
> While following a tutorial on how to create a simple chat server I stumbled
> upon this problem:
>  AttributeError: ChatServer instance has no attribute 'decriptors'

Hi Bob,

Attributes are things like methods or variables that are "attached" to
a class instance.  For example, instances of your CharServer class
have attributes like .port or .srvsock.

When you get an AttributeError, it means that you tried to access an
attribute and python couldn't find the attribute you wanted.  In this
particular case, the error message says that on line 53, you tried to
access "self.decriptors", and "self" (which is your ChatServer) didn't
have a "decriptors" attribute.

Looking through your code, I can see that you assign to
"self.descriptors" in your __init__ method.  So I guess this is just a
typo --- if you change "self.decriptors" to "self.descriptors", you
might have more luck :-)

--
John.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to