Strange Telnet error
timr at probo.com
Fri Sep 20 06:23:44 CEST 2002
mnations at airmail.net (Marc) wrote:
>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
> File "C:\Python22\lib\threading.py", line 396, in run
> apply(self.__target, self.__args, self.__kwargs)
> File "main.py", line 85, in run
> File "key.py", line 92, in command
> File "C:\python22\lib\telnetlib.py", line 272, in write
>AttributeError: 'int' object has no attribute 'sendall'
>Has anyone ever seen this before? If so, what could do this be related
I'm guessing you continued to try to do work after closing the connection.
Note this code at line 247:
"""Close the connection."""
self.sock = 0 # <<<< this makes self.sock an integer
self.eof = 1
Your code is multithreaded. Could another thread have closed the socket on
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list