On 26 March 2012 02:01, <valhallasw(a)svn.wikimedia.org> wrote:
> Revision: 10043
> Author: valhallasw
> Date: 2012-03-26 00:01:16 +0000 (Mon, 26 Mar 2012)
> Log Message:
> -----------
(...)
> Behavioural change: windows now either inputs/outputs ascii (without ctypes) or full unicode (with ctypes). Yes, no more chcp crap!
Update to r10043 to feel the magic!
(I have tested windows XP using python 2.5.4 and 2.7.2 and linux using
python 2.7.1. Unicode command-line arguments are not supported (yet),
as this requires reworking all sys.argv to pywikipedia-managed code.
If stuff breaks, go back to r10042 and send an e-mail).
Best,
Merlijn
Maybe you bot has the right page but read permission is needed for login api call which makes no sense.
Is there any white list to enable the login api call?
Try to login with use_api_login = False in your user_config but I am not sure whether this still works with mw >= 1.18
Regards
xqt
----- Original Nachricht ----
Von: Thehelpfulone <thehelpfulonewiki(a)gmail.com>
An: pywikipedia-l(a)lists.wikimedia.org
Datum: 12.04.2012 21:49
Betreff: [Pywikipedia-l] Using pywikipedia on a https:// site
> Hi all,
>
> I'm trying to use pywikipedia on a private wmf wiki, it can only be
> accessed by viewing it in https://. When I run login.py -all, I get
>
> Traceback (most recent call last):
> File "login.py", line 436, in <module>
> main()
> File "login.py", line 414, in main
> if not forceLogin and site.loggedInAs(sysop = sysop):
> File "/home/thehelpfulone/pywikipedia/wikipedia.py", line 5102, in
> loggedInAs
> self._load(sysop = sysop)
> File "/home/thehelpfulone/pywikipedia/wikipedia.py", line 6053, in _load
> raise RuntimeError('%s' % data['error'])
> RuntimeError: {u'info': u'You need read permission to use this module',
> u'code': u'readapidenied'}
>
> How can I fix the bot to allow it to log in (and thus run scripts?). By
> private wiki, I mean a wiki that you have to login to if you want to read
> anything other than the Main Page.
>
> Thanks for your help!
> --
> Thehelpfulone
> http://en.wikipedia.org/wiki/User:Thehelpfulone
> English Wikipedia Administrator
>
>
> --------------------------------
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
Hi,
To keep part of SuggestBot's data updated I have a script that polls
regularly (once an hour) and uses the site.recentchanges() method to
get a time-limited list of the recent changes. Lately I have noticed
that this script throws an error:
raise APIError(code, info, **result["error"])
pywikibot.data.api.APIError: rcpermissiondenied: You need the patrol
right to request the patrolled flag
>From what I can tell by sending manual requests to en-WP's API, I
don't get this error message if I'm logged in (as a regular user), but
it pops up if I'm not logged in. SuggestBot should be logged in, as I
make calls to pywikibot.getSite() and site.has_right() before I call
site.recentchanges(). So it could seem like the problem is related to
not being logged in.
I'm not sure where to start debugging this, maybe it's not a pywikibot
problem? Maybe it's only something I'm seeing? I'm running the
latest revision of the rewrite branch, btw.
Any input on where to start looking for clues would be great, thanks!
Cheers,
Morten
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(a)gmail.com>
Date: 13 April 2012 14:15
Subject: Re: Re: Re: [Pywikipedia-l] Recent changes, permission denied
need patrol right
To: info(a)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(a)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(a)gmail.com>
> An: info(a)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(a)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(a)gmail.com>
>> > An: Pywikipedia discussion list <pywikipedia-l(a)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(a)lists.wikimedia.org
>> >> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>> >>
>>
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(a)gmail.com>
An: info(a)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(a)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(a)gmail.com>
> > An: Pywikipedia discussion list <pywikipedia-l(a)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(a)lists.wikimedia.org
> >> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
> >>
>
Hi all,
I'm trying to use pywikipedia on a private wmf wiki, it can only be
accessed by viewing it in https://. When I run login.py -all, I get
Traceback (most recent call last):
File "login.py", line 436, in <module>
main()
File "login.py", line 414, in main
if not forceLogin and site.loggedInAs(sysop = sysop):
File "/home/thehelpfulone/pywikipedia/wikipedia.py", line 5102, in
loggedInAs
self._load(sysop = sysop)
File "/home/thehelpfulone/pywikipedia/wikipedia.py", line 6053, in _load
raise RuntimeError('%s' % data['error'])
RuntimeError: {u'info': u'You need read permission to use this module',
u'code': u'readapidenied'}
How can I fix the bot to allow it to log in (and thus run scripts?). By
private wiki, I mean a wiki that you have to login to if you want to read
anything other than the Main Page.
Thanks for your help!
--
Thehelpfulone
http://en.wikipedia.org/wiki/User:Thehelpfulone
English Wikipedia Administrator
Hi
I have found that when we upload the invalid license images throgh
Flickrripper, currently the tool does not allow copyrighted images (great),
but it does not show any message to the user like (invalid license). I have
tweaked this adding the message, so that user can aware of why the image
did not get upload.
Please suggest and let me know whether I can update to SVN
Regards,
Jenith
2012/4/2 <binbot(a)svn.wikimedia.org>
> http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10076
>
> Revision: 10076
> Author: binbot
> Date: 2012-04-02 12:06:30 +0000 (Mon, 02 Apr 2012)
> Log Message:
> -----------
> A new script to create redirects to articles with n dash/m dash in their
> title. i18n file will be sent to pywikipedia-l due to an access error.
>
Hi,
I attached a very small i18n file to this new script. Please anyone submit
it because I got an "access forbidden" error. :-(
--
Bináris
Hi,
catlib.py tries to say if a category is hidden like this:
hidden = re.search('__HIDDENCAT__', text)
But many wikis have already templates for that. See the interwikis at
http://en.wikipedia.org/wiki/Template:Hidden_category for Wikipedias. Shall
we list these templates within catlib.py, or what is the process? Is that a
similar task than handling disambig templates in solve_disambiguation.py?
--
Bináris