This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ideasman42
Recipients ideasman42
Date 2011-03-07.09:30:26
SpamBayes Score 1.8120426e-08
Marked as misclassified No
Message-id <1299490227.13.0.250987694391.issue11432@psf.upfronthosting.co.za>
In-reply-to
Content
On Linux - tested on: Arch linux @ Debian Squeeze, this fails
 python -c "__import__('webbrowser').open('http://python.org')"

The exception thats raised is:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.2/webbrowser.py", line 70, in open_new_tab
    return open(url, 2)
  File "/usr/lib/python3.2/webbrowser.py", line 62, in open
    if browser.open(url, new, autoraise):
  File "/usr/lib/python3.2/webbrowser.py", line 276, in open
    success = self._invoke(args, True, autoraise)
  File "/usr/lib/python3.2/webbrowser.py", line 239, in _invoke
    stderr=inout, preexec_fn=setsid)
  File "/usr/lib/python3.2/subprocess.py", line 736, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.2/subprocess.py", line 1330, in _execute_child
    raise child_exception_type(errno_num, err_msg)
OSError: [Errno 9] Bad file descriptor


Noticed that this wont raise an error when stdin arg isn't passed  to Popen:
line 237:
        p = subprocess.Popen(cmdline, close_fds=True, stdin=inout,

Removing tdin=inout makes firefox load ok, however this is there for a reason so its not a useful fix ofcourse.
History
Date User Action Args
2011-03-07 09:30:27ideasman42setrecipients: + ideasman42
2011-03-07 09:30:27ideasman42setmessageid: <1299490227.13.0.250987694391.issue11432@psf.upfronthosting.co.za>
2011-03-07 09:30:26ideasman42linkissue11432 messages
2011-03-07 09:30:26ideasman42create