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:<br><br>[root@mustang pywikipedia]# !python<br>python login.py<br>Password for user wikibot on mustang:en: <br>
Logging in to mustang:en as wikibot<br>Traceback (most recent call last):<br> File "login.py", line 376, in <module><br> main()<br> File "login.py", line 372, in main<br> loginMan.login()<br>
File "login.py", line 261, in login<br> cookiedata = self.getCookie(api)<br> File "login.py", line 178, in getCookie<br> response, data = self.site.postData(address, self.site.urlEncode(predata))<br>
File "/home/rwright/pywikipedia/wikipedia.py", line 4945, in postData<br> conn.endheaders()<br> File "/usr/lib/python2.6/httplib.py", line 868, in endheaders<br> self._send_output()<br> File "/usr/lib/python2.6/httplib.py", line 740, in _send_output<br>
self.send(msg)<br> File "/usr/lib/python2.6/httplib.py", line 699, in send<br> self.connect()<br> File "/usr/lib/python2.6/httplib.py", line 683, in connect<br> self.timeout)<br> File "/usr/lib/python2.6/socket.py", line 498, in create_connection<br>
for res in getaddrinfo(host, port, 0, SOCK_STREAM):<br>socket.gaierror: [Errno -2] Name or service not known<br>[root@mustang pywikipedia]# <br><br><br>I tried the only solution on the archive I could find<br><br><pre>
<span style="color: rgb(255, 0, 0);">Hello Mary,</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">the self.langs should contain the hostname 'localhost'. The path for the</span><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);">wiki should be given in scriptpath. In your case, try something like</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> self.langs = {'en': 'localhost'}</span><br style="color: rgb(255, 0, 0);">
<br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> def scriptpath(self, code):</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> return '/default'</span><br style="color: rgb(255, 0, 0);">
<br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">Hopefully that should work!</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);">Best reagards,</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">Merlijn</span><br></pre>This did not work.<br><br>Any help would be much appreciated.<br><br>
---Robert<br>