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(a)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