Forum:Pywikipedia Bot - help requested

Login issues
I have a new version of Python and pywikipedia now (having not used it for 18 months and experienced login access issueslast night). However still issues. I get the following having put in my password at the login.py prompt:

Traceback (most recent call last): File "C:\pywikipedia\login.py", line 436, in    main File "C:\pywikipedia\login.py", line 432, in main loginMan.login File "C:\pywikipedia\login.py", line 319, in login cookiedata = self.getCookie(api) File "C:\pywikipedia\login.py", line 181, in getCookie response, data = query.GetData(predata, self.site, sysop=self.sysop, back_re sponse = True) File "C:\pywikipedia\query.py", line 122, in GetData res, jsontext = site.postForm(path, params, sysop, site.cookies(sysop = syso p) ) File "C:\pywikipedia\wikipedia.py", line 4936, in postForm cookies=cookies) File "C:\pywikipedia\wikipedia.py", line 4990, in postData    raise PageNotFound(u'Page %s could not be retrieved. Check your family file ?' % url) pywikibot.exceptions.PageNotFound: Page http://fightingfantasy.wikia.com/w/api.p  hp could not be retrieved. Check your family file ?

When I check both the Index.php and the api.php files two things are apparent. First, they are at:

http://fightingfantasy.wikia.com/wiki/Index.php and http://fightingfantasy.wikia.com/wiki/Api.php

respectively (i.e. not w/index.php)

and second, neither of them have content. Whereas if you were to check http://starwars.wikia.com/wiki/Index.php it is the MainPage (and http://starwars.wikia.com/wiki/Api.php does not exist).

Does anyone know what I need to do from here?

My family file looks like this:

# -*- coding: utf-8 -*-

import family

# The Fighting Fantasy Wiki.

class Family(family.Family):

def __init__(self): family.Family.__init__(self) self.name = 'titannica' self.langs = { 'en': 'fightingfantasy.wikia.com', }       self.namespaces[4] = { '_default': u'TitannicaWiki', }

self.namespaces[5] = { '_default': u'TitannicaWiki talk', }

def hostname(self,code): return 'fightingfantasy.wikia.com' def path(self, code): return 'wiki/index.php' def version(self, code): return "1.9"

Any help would be greatly appreciated.Nedueb 11:43, May 5, 2010 (UTC)
 * Okay, to start off the urls are at /index.php and /api.php on Wikia, not /wiki/api.php, as you can see at http://fightingfantasy.wikia.com/api.php. Next, after you make sure you have the latest version of pywikipedia, your family file should look like this:


 * That should fix your login issues. If it doesn't, put  in your user-config.py file. Hope that helps :). Cheers,  Grunny  ( talk ) 13:58, May 5, 2010 (UTC)
 * That is fantastic! It works....many many thanks.Nedueb 15:00, May 5, 2010 (UTC)
 * No problem :-). Grunny  ( talk ) 15:14, May 5, 2010 (UTC)