socket.error: (9, 'Bad file descriptor') Python 2.5

Brian G. Merrell at
Fri Mar 16 20:56:02 CET 2007

I'm getting the following trace in python 2.5:

Traceback (most recent call last):
  File "./", line 36, in <module>
  File "/home/bean/code/automation/nrm-qa/trunk/brimstone/lib/", line
221, in start_browser
  File "/home/bean/code/automation/tomato/Tomato/", line 140, in
    res = self.sendcommand('open', url)
  File "/home/bean/code/automation/tomato/Tomato/", line 64, in
    return self.gateway.execute(selcmd, str(seltarget), str(selvalue))
  File "/home/bean/code/automation/tomato/Tomato/", line
137, in execute
    self.send_string(self.buildselenese(selcmd, seltarget, selvalue))
  File "/home/bean/code/automation/tomato/Tomato/", line
161, in send_string
  File "/usr/lib/python2.5/", line 261, in write
  File "/usr/lib/python2.5/", line 248, in flush
socket.error: (9, 'Bad file descriptor')

However, I do not have any problems when using Python 2.4.  In fact, I can
replace the library from 2.5 with the from 2.4 and it
fixes this problem.  I ran a diff on the two different versions,
and there are some differences but I couldn't see anything obvious that
would cause this.

Any ideas?  I can post more code if necessary.

Also, here are the versions I'm using:

Python 2.5 (r25:51908, Jan  9 2007, 16:59:32)
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2

Python 2.4.4 (#1, Mar 15 2007, 23:58:13)
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list