Sorry, didn't notice the reply just went to xqt, here's a forward to the list.
Cheers, Morten
---------- Forwarded message ---------- From: Morten Wang nettrom@gmail.com Date: 13 April 2012 14:15 Subject: Re: Re: Re: [Pywikipedia-l] Recent changes, permission denied need patrol right To: info@gno.de
I grabbed the latest trunk from SVN and wrote a variant of the test script I linked to earlier, and then it works just fine.
What's the take on trunk vs 2.0? When I started using PWB a couple of years ago (or thereabouts), 2.0 was the preferred version. Should I consider switching back?
Cheers, Morten
On 13 April 2012 11:35, info@gno.de wrote:
Oh I see, its pwb 2.0. Have you ever tried to run your script with the trunk release?
Regards xqt
----- Original Nachricht ---- Von: Morten Wang nettrom@gmail.com An: info@gno.de Datum: 13.04.2012 17:02 Betreff: Re: Re: [Pywikipedia-l] Recent changes, permission denied need patrol right
I am also confused by this bug. Figured out a test-case that triggers the error, code available from http://pastebin.com/1ES5Pxfc
If I comment out line 31 so it doesn't request the patrolled flag, the request succeeds. I also noticed that if I do that and check the userinfo sent back from the API for the third request, it says username is "SuggestBot", which means it shouldn't fail?
Cheers, Morten
On 13 April 2012 03:53, info@gno.de wrote:
I still do not understand the relationship. interwiki.py operates on
different sites too without having these problems.
Regards xqt
----- Original Nachricht ---- Von: Morten Wang nettrom@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 12.04.2012 22:17 Betreff: Re: [Pywikipedia-l] Recent changes, permission denied need patrol right
I've finally found some more time to fiddle with this problem. The problem appears to be related to the fact that I'm using one script that grabs data from three different Wikipedias (English, Norwegian, and Swedish) with three different accounts[1]. Doing them in order the script correctly logs in to each one, and when it later returns to the first one it seems to think it's logged in. Looking at the cookie info I see that the centralAuth info is correct for the Swedish account, not for the English, and there are cookies for user ID and username for each of the three langauges. So if the script thinks it's logged in to English Wikipedia and sends the request, the API will correctly notice that the info isn't consistent and throw the error.
Is my reasoning correct here? Is there something I can do on my end to force a login every time, or should I instead write my scripts so they run separately for each account?
Footnotes: 1: Once upon a time it seemed like a great idea... 2: Need to be logged in to read the patrolled flag, from what I've been able to figure out.
Cheers, Morten
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org