On Wed, Jul 13, 2005 at 09:30:22PM +0200, Daniel Herding wrote:
Jason Y. Lee wrote:
>Jason Y. Lee wrote:
>>Will someone explain to me how to set up the users in the
>>user-config.py?
jylee@acmserver:~/wikipedia/bots/pywikipedia $
python2.3 login.py
File "user-config.py", line 19, in ?
usernames['wikipedia']['en'] = 'VFD Bot'
KeyError: 'wikipedia'
Make sure there's a wikipedia_family.py in your families directory.
Maybe you're using the broken snapshot from 2005-07-11? Try to download
the most recent one.
Daniel
_______________________________________________
Wikibots-l mailing list
Wikibots-l(a)wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/wikibots-l
The copy is straight out from CVS.
Files:
config.py (top part)
# -*- coding: utf-8 -*-
#
# (C) Rob W.W. Hooft, 2003
#
# Distribute under the terms of the PSF license.
#
__version__ = '$Id: config.py,v 1.52 2005/07/12 00:18:47 wikipedian Exp $'
import os, re, sys
-----
user-config.py
-----
# -*- coding: utf-8 -*-
############## ACCOUNT SETTINGS ##############
# The family of sites we are working on. wikipedia.py will import
# families/xxx_family.py so if you want to change this variable,
# you need to write such a file.
family = 'wikipedia'
# The language code of the site we're working on.
mylang = 'en'
# The dictionary usernames should contain a username for each site where you
# have a bot account. Please set your usernames by adding such lines to your
# user-config.py:
#
# usernames['wikipedia']['de'] = 'myGermanUsername'
# usernames['wiktionary']['en'] = 'myEnglishUsername'
#
usernames = {}
usernames['wikipedia']['en'] = 'VFD Bot'
############## USER INTERFACE SETTINGS ##############
# the encoding that's used in the user's console, i.e. how strings are encoded
# when they are read by raw_input(). On Windows systems' DOS box, this should
# be 'cp850' ('cp437' for older versions). Linux users might try
'iso-8859-1'
# or 'utf-8'. If this variable is set to None, the default is 'cp850' on
# windows, and iso-8859-1 on other systems
console_encoding = None
# tkinter isn't yet ready
userinterface = 'terminal'
# Should the system bell be ringed if the bot expects user input?
ring_bell = False
-----
--
Jason Y. Lee
AKA AllyUnion