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
On Fri, June 19, 2009 9:56 pm, Beebe, Mary J wrote:
I am not trying a simpler family setup file. I am putting None in for en:'None'. Then adding: def hostname(self,code): return '/default'
Mary Beebe
From: pywikipedia-l-bounces@lists.wikimedia.org [mailto:pywikipedia-l-bounces@lists.wikimedia.org] On Behalf Of Beebe, Mary J Sent: Friday, June 19, 2009 3:22 PM To: pywikipedia-l@lists.wikimedia.org Subject: [Pywikipedia-l] Getting started
I am trying to setup pywikipedia to work on my local wiki. I have tried to follow online steps plus steps within README-family.txt.
My test wiki is: http://localhost/default (it is not live anywhere).
It seems like I am having trouble with this line within default_family.py (my family file).
self.langs = { # REQUIRED 'en': 'localhost/default', # Include one line for each wiki
in family # in the format 'code': 'hostname', }
I have tried many different possibilities but have been unsuccessful. Here is the message I receive with login.py:
login.py Password for user PyWikipedialBot on default:en: Logging in to default:en as PyWikipedialBot Traceback (most recent call last): File "C:\Documents and Settings\beebem\Desktop\pywikipedia\login.py", line 316, in <module> main() File "C:\Documents and Settings\beebem\Desktop\pywikipedia\login.py", line 312, in main loginMan.login() File "C:\Documents and Settings\beebem\Desktop\pywikipedia\login.py", line 248, in login cookiedata = self.getCookie() File "C:\Documents and Settings\beebem\Desktop\pywikipedia\login.py", line 166, in getCookie response, data = self.site.postData(address, self.site.urlEncode(predata)) File "C:\Documents and Settings\beebem\Desktop\pywikipedia\wikipedia.py", line 4655, in postData conn.endheaders() File "C:\Python26\lib\httplib.py", line 868, in endheaders self._send_output() File "C:\Python26\lib\httplib.py", line 740, in _send_output self.send(msg) File "C:\Python26\lib\httplib.py", line 699, in send self.connect() File "C:\Python26\lib\httplib.py", line 683, in connect self.timeout) File "C:\Python26\lib\socket.py", line 498, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno 11001] getaddrinfo failed
Thank you,
Mary Beebe
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I am just getting back to pywikipedia. I had not been able to work with it for a while. Anyway I did the changes that you suggested. I ran generate_user_files.py without any problem but had trouble with login.py. The error was:
File "C:\Python26\lib\socket.py", line 498, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno 11001] getaddrinfo failed
Thanks,
Mary Beebe
-----Original Message----- From: pywikipedia-l-bounces@lists.wikimedia.org [mailto:pywikipedia-l-bounces@lists.wikimedia.org] On Behalf Of Merlijn van Deen Sent: Friday, June 19, 2009 4:42 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] Getting started
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
On Fri, June 19, 2009 9:56 pm, Beebe, Mary J wrote:
I am not trying a simpler family setup file. I am putting None in for en:'None'. Then adding: def hostname(self,code): return '/default'
Mary Beebe
From: pywikipedia-l-bounces@lists.wikimedia.org [mailto:pywikipedia-l-bounces@lists.wikimedia.org] On Behalf Of Beebe, Mary J Sent: Friday, June 19, 2009 3:22 PM To: pywikipedia-l@lists.wikimedia.org Subject: [Pywikipedia-l] Getting started
I am trying to setup pywikipedia to work on my local wiki. I have tried to follow online steps plus steps within README-family.txt.
My test wiki is: http://localhost/default (it is not live anywhere).
It seems like I am having trouble with this line within default_family.py (my family file).
self.langs = { # REQUIRED 'en': 'localhost/default', # Include one line for each wiki
in family # in the format 'code': 'hostname', }
I have tried many different possibilities but have been unsuccessful. Here is the message I receive with login.py:
login.py Password for user PyWikipedialBot on default:en: Logging in to default:en as PyWikipedialBot Traceback (most recent call last): File "C:\Documents and Settings\beebem\Desktop\pywikipedia\login.py", line 316, in <module> main() File "C:\Documents and Settings\beebem\Desktop\pywikipedia\login.py", line 312, in main loginMan.login() File "C:\Documents and Settings\beebem\Desktop\pywikipedia\login.py", line 248, in login cookiedata = self.getCookie() File "C:\Documents and Settings\beebem\Desktop\pywikipedia\login.py", line 166, in getCookie response, data = self.site.postData(address, self.site.urlEncode(predata)) File "C:\Documents and Settings\beebem\Desktop\pywikipedia\wikipedia.py", line 4655, in postData conn.endheaders() File "C:\Python26\lib\httplib.py", line 868, in endheaders self._send_output() File "C:\Python26\lib\httplib.py", line 740, in _send_output self.send(msg) File "C:\Python26\lib\httplib.py", line 699, in send self.connect() File "C:\Python26\lib\httplib.py", line 683, in connect self.timeout) File "C:\Python26\lib\socket.py", line 498, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno 11001] getaddrinfo failed
Thank you,
Mary Beebe
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org