I have redownloaded those file and I have eve more errors now:
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 4600, in Family myfamily = __import__('%s_family' % fam) File "D:\development\pymw\families\ncdb_family.py", line 152 def version(self, code): ^ IndentationError: expected an indented block
Please help me fixing the errors one by one. :)
Regards my friends Cobra
-----Message d'origine----- From: Merlijn van Deen Sent: Thursday, December 23, 2010 12:42 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Hi CobraSA,
On 23 December 2010 08:40, CobraSA CobraSA@live.com wrote: (in reverse order)
I edited config.py http://pastebin.com/Zz3hrbHX I edited family.py: http://pastebin.com/0pEwKR9h And finally I edited the wikipedia.py http://pastebin.com/gEPEqNZs
Why did you edit these? This is generally unnecessary - anything in config.py can be set in user-config.py, and anything in family.py can be set in ncdb_family.py. Wikipedia.py should be modular enough to 'just work'.
Here is my user-config.py http://pastebin.com/AtFUHPeq In families folder I created a file ncdb_family.py, content: http://pastebin.com/0KW4EVBY
These look OK on first sight.
I tried to follow the tutorial but I still run in some trouble when I
use File "d:\development\pymw\wikipedia.py", line 4789, in Site def __init__(self, code, fam=ncdb, user=root, persistent_http = False ):
You did not define variables called ncdb or root. Did you mean fam="ncdb" and user="root"?
However, I would suggest using the original files. It is very hard for other people to help you when files such as wikipedia.py, family.py and config.py are changed. Try to only change things in user-config.py and ncdb_family.py - the bot will then probably run fine.
Best regards, Merlijn
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l