Thank you very much for your answer. The bot user has writing privileges. Actually the bot worked fine when we made the wiki public for a while. I didn't try the login -force thing yet....let you know if it worked.
Thank you,
Matthias
Sent from my mobile device.
Am 13.04.2013 um 21:18 schrieb Merlijn van Deen valhallasw@arctus.nl:
Hi Matthias,
On 27 February 2013 12:20, Matthias Schlögl m.schloegl@me.com wrote:
I try to edit pages in a private wiki with pywikipedia. the wiki is password protected, so you cant even look at a page without logging in. While the login is working normal, I get an error that I dont have access to the api as soon as I try to actually do anything: RuntimeError: {u'info': u'You need read permission to use this module', u'code': u'readapidenied'} {u'info': u'You need read permission to use this module', u'code': u'readapidenied'} The user account of the bot is active and the bot user group should have access to the api. Does anybody have an idea how I can solve this problem?
Sorry for the late response. I can think of three things that could cause this.
First of all, the bot might be trying to read the page without being logged in. This should *not* happen if you have logged in explicitly using login.py, though. You could try to force a re-login (python login.py -force , or remove the cookies file for rewrite) to see if that happens. You could also run the bot script with -v -v ('doubly verbose') to see the API queries being sent. A network sniffer would also help, but I'm not sure how easy that would be to do for you :-)
Secondly, maybe the bot user *doesn't* actually have read rights via the API. I'm not completely sure how to check this in a simple way, and it doesn't sound very plausible to me either ;-)
Thirdly, there may very well be a bug in the framework. Unfortunately, most of us don't use the bot on a local closed wiki, so it doesn't get quite the same amount of testing.
Best, Merlijn
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l