From: Ben H. <be...@in...> - 2001-01-19 03:45:48
|
Im getting an AttributeError in the httplib.py standard library when using urlretrieve(): Traceback (innermost last): File "FutureSourceSpider.py", line 86, in ? File "c:\software\jython\Lib\urllib.py", line 68, in urlretrieve File "c:\software\jython\Lib\urllib.py", line 198, in retrieve File "c:\software\jython\Lib\urllib.py", line 169, in open File "c:\software\jython\Lib\urllib.py", line 273, in open_http File "c:\software\jython\Lib\httplib.py", line 430, in putrequest AttributeError: __getitem__ The line throwing the error in inside an exception handler: try: self.send(str) except socket.error, v: # trap 'Broken pipe' if we're allowed to automatically reconnect >>>> if v[0] != 32 or not self.auto_open: <<<<< raise # try one more time (the socket was closed; this will reopen) self.send(str) I instrumented this code and determined that it executes when there is a timeout setting up a socket connection. This timeout condition is for my purpoises, transient and non-fatal. The underlying message: java.net.NoRouteToHostException: Operation timed out: no further information Possibly because this section rarely executes, a bug has gone undiscovered? I dont fully understand what would cause the AttributeError on the line above, can someone explain? -- Ben Hutchison Software Engineer-Market Predictor Webmind Australia http://www.webmind.com/productspredictor.html |