Hi,
I work on two Wikis, and on one of them, I'd like to use PyWikipedia to automate some tasks (I may end up using it on the other, too, but that's not my question).
So, during configuration, I ran generate_user_files.py, but since I had not yet created a Family file for either, they weren't options. Thus, I simply created a default one using my Wikipedia account. Tested it, worked fine (connected, asked for my password, at which point I used Ctrl+C to kill the script since I don't have authorization to run a bot on Wikipedia).
At this point I created a Family file for the Wiki I do want to use the bot on. I manually edited the user-config.py file to point to the new family, and run login.py, and I get some error messages - some mis-aligned tabs in my family file. I fix these, and then I get a very odd message:
"Please create a file user-config.py, and put in there:
One line saying "mylang='language'" One line saying "usernames['wikipedia']['language']='yy'"
...filling in your username and the language code of the wiki you want to work on.
For other possible configuration variables check config.py."
I tried deleting user-config.py, and using generate_user_files.py again, this time selecting my Wiki from the list. generate_user_files.py worked fine, but login.py had the same error again.
Then I deleted user-config.py and created it manually with the lines stated on http://meta.wikimedia.org/wiki/Pywikipedia_bot_on_non-wikimedia_projects:
family = 'sitename' # matches the name of the "sitename_family.py" file mylang = 'en' # the only language on the Wiki usernames['sitename']['en'] = DragoonWraith # my own account, at least for testing
Still got the same error.
At this point, I created a family file for the *other *Wiki, and that worked fine. Deleted user-config.py, re-created it with generate_user_files.py, and successfully logged in with login.py. Didn't do anything with it because I haven't really gotten that far; still need to learn how to use it - but that's besides the point.
OK, so I tried re-creating my family file for the first Wiki, since that was the only thing that was different. Still no go.
So, does anyone have any suggestions? Is there any relevant information I should be sending about the Wiki? Should I include the family file or the user-config file? Or anything else? Unfortunately, I'm such a newbie that I don't even know what questions to ask, or how to ask them properly. Sorry about that.
- DragoonWraith
pywikipedia-l@lists.wikimedia.org