Admin Forum:Trouble with pywikipediabot

I've been using my bot YodaBot on both the PathfinderWiki and Oscars Wiki for several years. Recently, however, I got a new computer and just set up the bot on the new machine. I've followed the instructions in this extremely helpful blog post and managed to get everything set up (I think). It lets me log in and a "login.py -test" command line confirms that. But when I try to edit, I get errors that I don't have a token and won't be able to edit pages. Can anyone offer any assistance in this? Without the ability to use the bot, categorizing images is going to make for some really, really tedious editing in the future. — yoda8myhead (talk) 08:21, December 12, 2012 (UTC)


 * Try setting it back up from scratch if you haven't already. Do you have the most up-to-date version of Python installed? (2.7.3) --Callofduty4 (talk) 09:27, December 12, 2012 (UTC)


 * Could you provide a few more details, please?
 * OS (and version number)
 * Python version number
 * Pywikipedia version number
 * Whether you have access to the known working pywikipedia folder on your old computer
 * Whether you're sure you're using the right family.py file for the wiki you're trying to edit
 * Whether you're absolutely sure that your account is bot-flagged on the wiki you're trying to edit


 * Having recently upgraded my own computer recently, I'd say that your initial approach would be to just copy your old, working pywikipedia folder over to your new computer, change its permissions (depending on OS) so that the current account can access the files within that folder, and there ya go.


 * But, as I said, I don't really know enough details about your situation to really diagnose. 19:16: Wed 12 Dec 2012
 * Okay, I can see that you're a flagged bot on both oscars and pathfinder, but I can also see that it's been at least a year since you've made any edits with that account — on pathfinder, it's been almost three years. If you're trying to use the same package of files that you used back in the day, you'll probably have some difficulties.


 * The thing I'm thinking now is just that your family files aren't right. How 'bout posting them in their entirety, as well as user-config.py, and maybe I can spot the issue for you. 19:26: Wed 12 Dec 2012
 * Oh, another thing: it would be helpful to know exactly what you were trying to do when you got the error message.  Could you cut and paste the command you were trying to give?  Also, please put this into your command line.  It'll harmlessly test whether things are generally working or not.  Log into oscars and then type python pagegenerators.py -cat:"2010 nominated films" That should just generate a list of the movies in the category, and thereby prove that the error is in whatever command you issued, not your general setup.  If that instance of pagegenerators produces an error of any kind, please post that error back here.  19:34: Wed 12 Dec 2012


 * Thanks. I'll try all those when I get home tonight. —yoda8myhead (talk) 19:38, December 12, 2012 (UTC)


 * Oh, I should also point out that it's entirely possible you've simply been unlucky. I've not been running my bot while I've been posting to you, so I'm not aware of any problems with the api.  But there are times where you'll get that "invalid token" error purely because of some sort of behind-the-scenes connectivity issue at Wikia itself.  There've been plenty of times I've been in a big bot run and had the thing start throwing me tons of those "invalid token" errors.  They just keep coming until they eventually stop, and there's not a thing you can do about it.   19:44: Wed 12 Dec 2012


 * Ok, so I tested the command line you provided above and it worked perfectly. I'm still getting an error when entering the following, however:
 * python category.py add -file:nuke.txt
 * I'm on a Mac running OSX 10.8.2, Python 2.7, pywikipedia nightly build 2012-12-10
 * Let me know if you need to see my user-config and family files, and thanks for the help. —yoda8myhead (talk) 08:08, December 13, 2012 (UTC)