Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm getting this strange error when I try to use pydoc to look at python documentation.

$ pydoc -p 10000
pydoc server stopped
Traceback (most recent call last):
  File "/usr/bin/pydoc", line 5, in <module>
  File "/usr/lib/python2.7/", line 2281, in cli
    serve(port, ready, stopped)
  File "/usr/lib/python2.7/", line 2057, in serve
    DocServer(port, callback).serve_until_quit()
  File "/usr/lib/python2.7/", line 2039, in __init__
    self.base.__init__(self, self.address, self.handler)
  File "/usr/lib/python2.7/", line 408, in __init__
  File "/usr/lib/python2.7/", line 108, in server_bind
  File "/usr/lib/python2.7/", line 419, in server_bind
  File "/usr/lib/python2.7/", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -2] Name or service not known

I've tried reinstalling python and trying several different ports to no avail. Also

$ python -m SimpleHTTPServer

works fine. I'm not really sure why this is happening, could it be some bug?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.