I have fixed line 152 error by removing api support like in
mozilla_family
but now I have another error
D:\Development\python>python.exe D:\development\pymw\login.py
Traceback (most recent call last):
File "D:\development\pymw\login.py", line 58, in
<module>
import re, os, query
File "d:\development\pymw\query.py", line 28, in
<module>
import wikipedia, time
File "D:\development\pymw\wikipedia.py", line 7600, in
<module>
getSite(noLogin=True)
File "D:\development\pymw\wikipedia.py", line 7450, in getSite
persistent_http=persistent_http)
File "D:\development\pymw\wikipedia.py", line 4792, in
__init__
self.family = Family(fam, fatal = False)
File "D:\development\pymw\wikipedia.py", line 4613, in Family
family = myfamily.Family()
File "D:\development\pymw\families\ncdb_family.py", line 30, in
__init__
'Nintendo Cartridges Database Wiki': [u'Nintendo
Cartridges Database Wiki',
self.namespaces[4]['Nintendo Cartridges Database Wiki']], # REQUIRED
KeyError: 'Nintendo Cartridges Database Wiki'
Sent: Thursday, December 23, 2010 4:11 PM
Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb
wiki
D:\Development\python>python.exe
D:\development\pymw\generate_family_file.py
Traceback (most recent call last):
File "D:\development\pymw\generate_family_file.py", line 41, in
<module>
import family
File "D:\development\pymw\family.py", line 10, in
<module>
import config
File "D:\development\pymw\config.py", line 485, in
<module>
for _filename in os.listdir(os.path.join(_base_dir,
'families')):
WindowsError: [Error 3] Le chemin dÆaccÞs spÚcifiÚ est introuvable:
'.\\families
/*.*'
Sent: Thursday, December 23, 2010 3:58 PM
Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb
wiki
Try
using generate_family_files.py that should ensure that you dont have these
problems
On Thu, Dec 23, 2010 at 9:43 AM, CobraSA
<CobraSA@live.com>
wrote:
Hi
I have changed ‘1.16.0’ for ‘pass’ or for ‘’
And still same error line 152.

Regards
Cobra
Sent: Thursday, December 23, 2010 2:35 PM
Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb
wiki
File "D:\development\pymw\families\ncdb_family.py", line
152
def version(self,
code):
^
IndentationError: expected an
indented block
Look, I found the error for you in the pastebin.
-
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'
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.
--
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