The file was deleted, I deleted it again:D:\Development\python>python generate_family_file.pyUsage: %s <url> <short name>Example: %s http://www.mywiki.bogus/wiki/Main_Page mywikiThis will create the file families/mywiki_family.pyPlease insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.org/wiki/Main_Page ncdbPlease insert a short name (eg: freeciv): ncdbGenerating family file from http://nintendo-cartridges-database.the-chronicles.org/wiki/Main_Page ncdbTraceback (most recent call last):File "generate_family_file.py", line 256, in <module>FamilyFileGenerator(*sys.argv[1:]).run()File "generate_family_file.py", line 60, in runw = Wiki(self.base_url)File "generate_family_file.py", line 217, in __init__data = urlopen(fromurl).read()File "generate_family_file.py", line 21, in urlopenreturn urllib2.urlopen(req)File "D:\Development\python\lib\urllib2.py", line 124, in urlopenreturn _opener.open(url, data, timeout)File "D:\Development\python\lib\urllib2.py", line 383, in openresponse = self._open(req, data)File "D:\Development\python\lib\urllib2.py", line 401, in _open'_open', req)File "D:\Development\python\lib\urllib2.py", line 361, in _call_chainresult = func(*args)File "D:\Development\python\lib\urllib2.py", line 1130, in http_openreturn self.do_open(httplib.HTTPConnection, req)File "D:\Development\python\lib\urllib2.py", line 1103, in do_openr = h.getresponse()File "D:\Development\python\lib\httplib.py", line 950, in getresponseresponse.begin()File "D:\Development\python\lib\httplib.py", line 390, in beginversion, status, reason = self._read_status()File "D:\Development\python\lib\httplib.py", line 354, in _read_statusraise BadStatusLine(line)httplib.BadStatusLineFrom: John DoeSent: Saturday, December 25, 2010 5:06 AMSubject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki/facepalm
Delete your existing family file
python generate_family_file.py INSERT_URL_TO_SITE ncdb
thats how your run generate family files.py
John
On Fri, Dec 24, 2010 at 10:52 PM, CobraSA <CobraSA@live.com> wrote:
Interesting new errorD:\Development\python>python login.pyTraceback (most recent call last):File "login.py", line 58, in <module>import re, os, queryFile "d:\development\pymw\query.py", line 28, in <module>import wikipedia, timeFile "D:\development\pymw\wikipedia.py", line 143, in <module>from pywikibot import *File "d:\development\pymw\pywikibot\__init__.py", line 15, in <module>from exceptions import *File "d:\development\pymw\pywikibot\exceptions.py", line 13, in <module>import configFile "D:\development\pymw\config.py", line 513, in <module>execfile(_filename)File "D:\Development\python\user-config.py", line 4, in <module>usernames['ncdb']['en'] = u'root'KeyError: 'ncdb'From: BinárisSent: Thursday, December 23, 2010 2:35 PMSubject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wikiFile "D:\development\pymw\families\ncdb_family.py", line 152def version(self, code):
^
IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
def apipath(self, code): # raise NotImplementedError, "%s wiki family does not support api.php" % self.name # return '%s/api.php' % self.scriptpath(code) # Which version of MediaWiki is used? REQUIRED def version(self, code): # Replace with the actual version being run on your wiki return '1.16.0'
--
Bináris
_______________________________________________
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 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