Strange Telnet error

Eddie Corns eddie at holyrood.ed.ac.uk
Thu Sep 19 06:47:07 EDT 2002


mnations at airmail.net (Marc) writes:

>Hi,

>I have been running some code that all the sudden stopped working. I
>can not figure out what's happened. I am doing a simple telnet
>connection that sends and receives info. Now I am getting this error:


>Traceback (most recent call last):
>  File "C:\Python22\lib\threading.py", line 408, in __bootstrap
>    self.run()
>  File "C:\Python22\lib\threading.py", line 396, in run
>    apply(self.__target, self.__args, self.__kwargs)
>  File "main.py", line 85, in run
>    command[0](*command[1:3])
>  File "key.py", line 92, in command
>    conn.write(com)
>  File "C:\python22\lib\telnetlib.py", line 272, in write
>    self.sock.sendall(buffer)
>AttributeError: 'int' object has no attribute 'sendall'


Have you just loaded a new version of Python by any chance.  Line 272 in my
2.2 copy of telnetlib has 'send' instead of 'sendall', the latter seems to be
the better of the two so I guess it's a newer version.  Which makes me suspect
they've broken something else while working on it, in which case I'd report it
as a bug.  Unless of course, your code fiddles about with the underlying
sockets and things of the telnet object.

Eddie



More information about the Python-list mailing list