I am installing pywikipedia. I have gotten to  the point where I can run python login.py and get prompted for a password. Then I get this:

[root@mustang pywikipedia]# !python
python login.py
Password for user wikibot on mustang:en:
Logging in to mustang:en as wikibot
Traceback (most recent call last):
  File "login.py", line 376, in <module>
    main()
  File "login.py", line 372, in main
    loginMan.login()
  File "login.py", line 261, in login
    cookiedata = self.getCookie(api)
  File "login.py", line 178, in getCookie
    response, data = self.site.postData(address, self.site.urlEncode(predata))
  File "/home/rwright/pywikipedia/wikipedia.py", line 4945, in postData
    conn.endheaders()
  File "/usr/lib/python2.6/httplib.py", line 868, in endheaders
    self._send_output()
  File "/usr/lib/python2.6/httplib.py", line 740, in _send_output
    self.send(msg)
  File "/usr/lib/python2.6/httplib.py", line 699, in send
    self.connect()
  File "/usr/lib/python2.6/httplib.py", line 683, in connect
    self.timeout)
  File "/usr/lib/python2.6/socket.py", line 498, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known
[root@mustang pywikipedia]#


I tried the only solution on the archive I could find

Hello Mary,

the self.langs should contain the hostname 'localhost'. The path for the
wiki should be given in scriptpath. In your case, try something like

self.langs = {'en': 'localhost'}

def scriptpath(self, code):
return '/default'



Hopefully that should work!

Best reagards,
Merlijn
This did not work.

Any help would be much appreciated.

---Robert