Will someone explain to me how to set up the users in the user-config.py?
When I add this line: usernames['wikipedia']['en'] = 'VFD Bot'
It gives me a key error.
try VFD_Bot
just a guess
Jason Y. Lee wrote:
Will someone explain to me how to set up the users in the user-config.py?
When I add this line: usernames['wikipedia']['en'] = 'VFD Bot'
It gives me a key error.
Can you give more details? Preferrably the debug output (stack trace) the bot gives before crashing.
Daniel
Jason Y. Lee wrote:
Will someone explain to me how to set up the users in the user-config.py?
When I add this line: usernames['wikipedia']['en'] = 'VFD Bot'
It gives me a key error.
Can you give more details? Preferrably the debug output (stack trace) the bot gives before crashing.
Daniel _______________________________________________ Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
jylee@acmserver:~/wikipedia/bots/pywikipedia $ python2.3 login.py Traceback (most recent call last): File "login.py", line 40, in ? import wikipedia, config File "/home/acmusers/jylee/wikipedia/bots/pywikipedia/wikipedia.py", line 99, in ? import config, mediawiki_messages, login File "/home/acmusers/jylee/wikipedia/bots/pywikipedia/config.py", line 133, in ? execfile(_filename) File "user-config.py", line 19, in ? usernames['wikipedia']['en'] = 'VFD Bot' KeyError: 'wikipedia'
---- Jason Y. Lee
That's weird... You do have a recent config.py? Which version (what does it look like?) and what is your full user-config.py?
Andre Engels
On 7/13/05, Jason Y. Lee jylee@cs.ucr.edu wrote:
Jason Y. Lee wrote:
Will someone explain to me how to set up the users in the user-config.py?
When I add this line: usernames['wikipedia']['en'] = 'VFD Bot'
It gives me a key error.
Can you give more details? Preferrably the debug output (stack trace) the bot gives before crashing.
Daniel _______________________________________________ Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
jylee@acmserver:~/wikipedia/bots/pywikipedia $ python2.3 login.py Traceback (most recent call last): File "login.py", line 40, in ? import wikipedia, config File "/home/acmusers/jylee/wikipedia/bots/pywikipedia/wikipedia.py", line 99, in ? import config, mediawiki_messages, login File "/home/acmusers/jylee/wikipedia/bots/pywikipedia/config.py", line 133, in ? execfile(_filename) File "user-config.py", line 19, in ? usernames['wikipedia']['en'] = 'VFD Bot' KeyError: 'wikipedia'
Jason Y. Lee
Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
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
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@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
-----
Put the line usernames['wikipedia']['en'] = 'VFD Bot' into your user-config.py instead of config.py, and everything should be fine.
Andre Engels
On 7/14/05, Jason Y. Lee jylee@cs.ucr.edu wrote:
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 _______________________________________________ Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
It is, actually. Sorry, I should have separated the two files better, but the top is config.py, then the rest of it is user-config.py
On Thu, Jul 14, 2005 at 11:36:12AM +0200, Andre Engels wrote:
Put the line usernames['wikipedia']['en'] = 'VFD Bot' into your user-config.py instead of config.py, and everything should be fine.
Andre Engels
On 7/14/05, Jason Y. Lee jylee@cs.ucr.edu wrote:
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 _______________________________________________ Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
Hmm... if I comment out the line: usernames = {}
in user-config.py, I get a different error: Checked for running processes. 1 processes currently running, including the current process. Traceback (most recent call last): File "login.py", line 40, in ? import wikipedia, config File "/home/acmusers/jylee/wikipedia/bots/pywikipedia/wikipedia.py", line 2188, in ? exec "import %s_interface as uiModule" % config.userinterface File "<string>", line 1, in ? ImportError: No module named terminal_interface
----
On Fri, Jul 15, 2005 at 12:18:34AM -0700, Jason Y. Lee wrote:
It is, actually. Sorry, I should have separated the two files better, but the top is config.py, then the rest of it is user-config.py
On Thu, Jul 14, 2005 at 11:36:12AM +0200, Andre Engels wrote:
Put the line usernames['wikipedia']['en'] = 'VFD Bot' into your user-config.py instead of config.py, and everything should be fine.
Andre Engels
On 7/14/05, Jason Y. Lee jylee@cs.ucr.edu wrote:
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 _______________________________________________ Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
-- Jason Y. Lee AKA AllyUnion _______________________________________________ Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
On 7/15/05, Jason Y. Lee jylee@cs.ucr.edu wrote:
Hmm... if I comment out the line: usernames = {}
in user-config.py, I get a different error:
That line should not be in user-config.py anyway.
Checked for running processes. 1 processes currently running, including the current process. Traceback (most recent call last): File "login.py", line 40, in ? import wikipedia, config File "/home/acmusers/jylee/wikipedia/bots/pywikipedia/wikipedia.py", line 2188, in ? exec "import %s_interface as uiModule" % config.userinterface File "<string>", line 1, in ? ImportError: No module named terminal_interface
Then you probably have used the snapshot where by accident subdirectories were not shown. Get the newest snapshot, or download the userinterfaces directory from CVS.
Andre Engels
wikibots-l@lists.wikimedia.org