Hi,
Thanks for the reply,
I do actually have correct path in there, edited it out in the post.
Basically I had 'servername.ng-london.org.uk/~joe/testwiki'
As you mentioned the path I actually tried moving to the root rather than my own area:
'servername.ng-london.org.uk/testwiki'
and I tried
'localhost/testwiki'
But still no joy.
Thanks
Joe
Merlijn van Deen wrote:
In the testwiki_family.py:
self.langs = { 'en': '"server_path"/testwiki', }
that should be 'en': 'localhost/wiki', or whereever your wiki is located.
Good luck.
--valhallasw
On Wed, April 9, 2008 2:55 pm, Joseph Padfield wrote:
Hi,
Can anyone recommend some good trouble shooting/debugging websites for setting up Pywikipedia.
I have followed the installation instructions on http://meta.wikimedia.org/wiki/Using_the_python_wikipediabot but when I try running the "login.py" it fails, output attached below. I guess I have missed something but I can't see what it is and I am not sure how to debug it. Searching this archive for "installation" or "login" has not helped.
I have set up a new testwiki on a local machine, the user name for my bot is correctly register and work for the actual wiki.
I have included my user-config.py and testwiki_family.py files, in case it is an obvious silly mistake.
Thanks for your help
Joe
# python version.py #################################################### Checked for running processes. 1 processes currently running, including the current process. Pywikipedia (r5199 (wikipedia.py), Apr 08 2008, 19:34:47) Python 2.4.4c1 (#2, Mar 7 2008, 02:53:24) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] #################################################################
# Error message ###################################################### python login.py Checked for running processes. 1 processes currently running, including the current process. Password for user RDFbot on testwiki:en: Logging in to testwiki:en as RDFbot Traceback (most recent call last): File "login.py", line 277, in ? main() File "login.py", line 273, in main loginMan.login() File "login.py", line 219, in login cookiedata = self.getCookie() File "login.py", line 131, in getCookie response, data = self.site.postForm(address, predata, useCookie=False) File "/home/joe/software/wiki/pywikipedia_svn/wikipedia.py", line 4008, in postForm raise ServerError(e) wikipedia.ServerError: (-2, 'Name or service not known') ##############################################################
# user-config.py ##################################################### mylang = 'en' family = 'testwiki' usernames['testwiki']['en'] = 'RDFbot' console_encoding = 'utf-8' #################################################################
# testwiki_family.py #################################################### # -*- coding: utf-8 -*- import family
# The testwiki.
class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'testwiki'
self.langs = { 'en': '"server_path"/testwiki', } self.namespaces[4] = { '_default': u'TestWiki', } self.namespaces[5] = { '_default': u'TestWiki talk', } self.biglangs = ['en'] def path(self, code): return '/%s/index.php' % code #The language code is included in
the path
def version(self, code): return "1.12"
##########################################################
-- Joseph Padfield, joseph.padfield@ng-london.org.uk, Tel: +44 (0)20 7747 2553 Fax: +44 (0)20 7839 3897 Conservation Scientist, Scientific Department, The National Gallery, Trafalgar Square, London, WC2N 5DN
Pompeo Batoni (1708-1787) Until 18 May 2008 Book Now http://www.nationalgallery.org.uk/exhibitions/batoni/tickets.htm Open daily 10am to 6pm, Wednesdays until 9pm
Sign up for the latest news, offers and exclusive competitions from the National Gallery by clicking on this link http://www.nationalgallery.org.uk/what/news/subscribe.htm
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l