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.

classification
Title: OSError importing antigravity module
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: ackounts, ezio.melotti, rosslagerwall, santoso.wijaya
Priority: normal Keywords:

Created on 2011-04-14 22:03 by ackounts, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg133776 - (view) Author: (ackounts) Date: 2011-04-14 22:03
When I try to import antigravity module on Linux I get an error (on Windows it runs fine):

Python 3.2 (r32:88445, Feb 21 2011, 01:55:53) 
[GCC 4.5.2 20110127 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import antigravity
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.2/antigravity.py", line 5, in <module>
    webbrowser.open("http://xkcd.com/353/")
  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
msg133785 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-04-15 04:54
This seems to be a duplicate of #11432.
Can you try to compile the latest Python 3.2 (or 3.3) and see if you still get the problem?

You can do it by following these steps:
hg clone http://hg.python.org/cpython
cd cpython
hg up 3.2
./configure && make
./python
import antigravity

See also http://docs.python.org/devguide/setup.html
msg133787 - (view) Author: Ross Lagerwall (rosslagerwall) (Python committer) Date: 2011-04-15 05:03
As an extra, presumably if you just do:
import webbrowser
webbrowser.open("http://www.python.org")

it also fails?
msg133870 - (view) Author: (ackounts) Date: 2011-04-15 19:57
You right, webbrowser.open fails too. It was a duplicate one, sorry guys.
History
Date User Action Args
2022-04-11 14:57:16adminsetgithub: 56056
2011-04-15 19:57:14ackountssetstatus: open -> closed
resolution: duplicate
messages: + msg133870
2011-04-15 05:03:26rosslagerwallsetstatus: pending -> open

nosy: + rosslagerwall
messages: + msg133787

type: crash -> behavior
2011-04-15 04:54:13ezio.melottisetstatus: open -> pending
nosy: + ezio.melotti
messages: + msg133785

2011-04-14 22:24:44santoso.wijayasetnosy: + santoso.wijaya
2011-04-14 22:03:51ackountscreate