[bugs:#1668] Cannot add custom family

Status: open
Created: Thu Sep 05, 2013 03:46 AM UTC by Legoktm
Last Updated: Thu Sep 05, 2013 03:46 AM UTC
Owner: nobody

Reported by ah001 in #pywikipediabot, and confirmed by me.

How to reproduce:

Clone a fresh copy of pywikibot-core, and add a custom family.py file in core/pywikibot/families. I've attached the one I tried with.

Now run "python pwb.py login"

Create your user-config using that wiki, and a random account. Once generate_user_files finishes, you'll get a traceback of:

Traceback (most recent call last):
File "pwb.py", line 103, in
run_python_file(fn, args)
File "pwb.py", line 49, in run_python_file
exec compile(source, filename, "exec") in main_mod.dict
File "scripts/login.py", line 101, in
main()
File "scripts/login.py", line 60, in main
for arg in pywikibot.handleArgs(*args):
File "/Users/km/test/core/pywikibot/bot.py", line 641, in handleArgs
init_handlers()
File "/Users/km/test/core/pywikibot/bot.py", line 233, in init_handlers
writelogheader()
File "/Users/km/test/core/pywikibot/bot.py", line 243, in writelogheader
site = pywikibot.getSite()
File "/Users/km/test/core/pywikibot/init.py", line 298, in Site
_sites[key] = Site(code=code, fam=fam, user=user, sysop=sysop)
File "/Users/km/test/core/pywikibot/site.py", line 746, in
init
BaseSite.
init(self, code, fam, user, sysop)
File "/Users/km/test/core/pywikibot/site.py", line 123, in
init
self.
family = Family(fam, fatal=False)
File "/Users/km/test/core/pywikibot/site.py", line 100, in Family
raise Error("Family %s does not exist" % fam)
pywikibot.exceptions.Error: Family brueghelwiki does not exist


Sent from sourceforge.net because Pywikipedia-bugs@lists.wikimedia.org is subscribed to https://sourceforge.net/p/pywikipediabot/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/pywikipediabot/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.