Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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/pydoc.py", line 2281, in cli
    serve(port, ready, stopped)
  File "/usr/lib/python2.7/pydoc.py", line 2057, in serve
    DocServer(port, callback).serve_until_quit()
  File "/usr/lib/python2.7/pydoc.py", line 2039, in __init__
    self.base.__init__(self, self.address, self.handler)
  File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
  File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
  File "/usr/lib/python2.7/socket.py", 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.