Re: [Tutor] An attribute error problem

2005-03-29 Thread Kevin
Well I think I am going to learn how to create small little server the
will just send and recive a message from a client. I just want to know
is it easier to use twistedmatrix or just plain socket to create
servers?

Thanks
Kevin


On Tue, 29 Mar 2005 06:11:46 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Kevin wrote:
> > Well I just noticed somthing about the entire sServer.py file. All the
> > code under each def is not indented
> 
> sServer.py mixes tabs and spaces for indentation. If you view it in an editor 
> that indents 8 spaces
> for a tab it is fine.
> 
> You might be interested in the reindent.py and untabify.py scripts in the 
> Python/Tools/Scripts
> directory.
> 
> Kent
> 
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] An attribute error problem

2005-03-29 Thread Kent Johnson
Kevin wrote:
Well I just noticed somthing about the entire sServer.py file. All the
code under each def is not indented
sServer.py mixes tabs and spaces for indentation. If you view it in an editor that indents 8 spaces 
for a tab it is fine.

You might be interested in the reindent.py and untabify.py scripts in the Python/Tools/Scripts 
directory.

Kent
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] An attribute error problem

2005-03-28 Thread Kevin
Well I just noticed somthing about the entire sServer.py file. All the
code under each def is not indented, after I fixed all the indentation
I got a host of other errors when I try to log in. I posted the files
on my site if you want to take a look at it. There are to many
problems with it right now. I only wanted to look at how it ran under
a linux box and windows to see how a mud server would run.

Thanks for the help

Kevin


On Mon, 28 Mar 2005 20:25:38 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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@python.org
> http://mail.python.org/mailman/listinfo/tutor
> 
> >>>
> >>>
> >>___
> >>Tutor maillist  -  Tutor@python.org
> >>http://mail.python.org/mailman/listinfo/tutor
> >>
> >
> >
> 
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] An attribute error problem

2005-03-28 Thread Kent Johnson
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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@python.org
http://mail.python.org/mailman/listinfo/tutor

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

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


Re: [Tutor] An attribute error problem

2005-03-28 Thread Kevin
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))
  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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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@python.org
> >>http://mail.python.org/mailman/listinfo/tutor
> >>
> >
> >
> 
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] An attribute error problem

2005-03-28 Thread Kent Johnson
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 <[EMAIL PROTECTED]> 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@python.org
http://mail.python.org/mailman/listinfo/tutor

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


Re: [Tutor] An attribute error problem

2005-03-28 Thread Kevin
Nope it will still give the same Attribute error.


On Mon, 28 Mar 2005 13:50:07 -0500, Kent Johnson <[EMAIL PROTECTED]> 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@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] An attribute error problem

2005-03-28 Thread Kent Johnson
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@python.org
http://mail.python.org/mailman/listinfo/tutor