User Details
- User Since
- Oct 13 2014, 5:50 AM (525 w, 5 d)
- Availability
- Available
- LDAP User
- Dalba
- MediaWiki User
- Dalba [ Global Accounts ]
Aug 29 2024
Jan 12 2024
Sep 27 2023
Feb 28 2023
I'm not sure how the login script works, but you should be able to workaround the main issue by calling site.login() in your script:
import pywikibot site = pywikibot.Site() site.login() # add this line, make sure username and password_file are defined in user-config.py print(len(list(site.watched_pages())))
(this way, there should be no need to call pwb.py login before running the script)
Feb 15 2023
Does this error also occur if you clone mirror repos ( https://github.com/wikimedia/pywikibot.git and https://github.com/wikimedia/pywikibot-i18n.git )?
Dec 6 2022
Nov 29 2022
Oct 6 2022
Jan 13 2022
Dec 8 2021
Hi @Xqt,
Do you have access to pywikibot account on toolforge? (according to https://admin.toolforge.org/tool/pywikibot you do)
Nov 3 2020
Sep 17 2020
Sep 11 2020
Aug 21 2020
Also interesting that adding
textarea[dir='rtl'], input[dir='rtl'] { direction:rtl !important; } textarea[dir='ltr'], input[dir='ltr'] { direction:ltr !important; }
to Special:MyPage/common.css (as suggested by @Nightdevil on fawiki) does fix the issue for me.
Aug 11 2020
Aug 3 2020
Jul 25 2020
Jul 21 2020
Jun 28 2020
More questions ... :)
Jun 6 2020
Jun 2 2020
Interesting, so, in a way, Parsoid allows writing whole sections inside a title. (not that I'm complaining, just a very unrealistic case I noted).
May 25 2020
May 24 2020
May 9 2020
Mar 3 2020
Jan 19 2020
Jan 18 2020
Oct 26 2019
Sep 7 2019
My premise was not true. There are several other queries that also have different formats.
Sep 6 2019
https://www.mediawiki.org/wiki/API:Query#Example_5:_Batchcomplete mentions https://en.wikipedia.org/w/api.php?action=query&list=allimages&ailimit=3&format=jsonfm&formatversion=2 as an example of batchcomplete.
Aug 25 2019
According to T154324#4164161 this should also be resolvable in pywikibot itself and I think https://gerrit.wikimedia.org/r/c/pywikibot/core/+/531589 will do it.
Aug 22 2019
Aug 21 2019
I'm curious to know if e.info contains any more details. Adding the following print statement to login.py should print it:
pywikibot-core[master] $ git diff diff --git a/pywikibot/login.py b/pywikibot/login.py index 3bc76619..b9bee2b2 100644 --- a/pywikibot/login.py +++ b/pywikibot/login.py @@ -304,6 +304,7 @@ class LoginManager(object): except pywikibot.data.api.APIError as e: error_code = e.code pywikibot.error('Login failed ({}).'.format(error_code )) + print(e.info, self.login_name, self.password) if error_code in self._api_error: error_msg = 'Username "{}" {} on {}'.format( self.login_name, self._api_error[error_code], self.site)
(also check username and password)
Aug 20 2019
@Huji, are having multiple pywikibot processes running on the same machine? Maybe this is the result of a race condition between them. If so, try it with a single process per user.
Aug 17 2019
Aug 14 2019
Could you give BotParsswords or OAuth a try, please, and see if the same Invalid CSRF token error occurs or not?
Aug 13 2019
Jul 31 2019
Maybe switching to bot passwords will resolve this issue. I would suggest doing so. action=login has been long deprecated anyway.
Jul 30 2019
Jul 24 2019
Jul 20 2019
Jul 19 2019
Apparently this is not limited to python 2, there is a failure on py341 on appveyor: https://ci.appveyor.com/project/Ladsgroup/pywikibot-g4xqx/builds/26087824/job/jm5299v53hmuib2q
Jul 18 2019
Jul 15 2019
Could not find a way to reproduce, maybe the source is somewhere other than getCookie...
Jun 29 2019
BTW, I think the error message (...limited to members of the Interface administrators group..) should be changed to complain about the required user rights, not the user group.
Thanks Umherirrender. Because of the strange translation I had not noticed that one. Sorry for that. I needed to have editsitejs right.
(Also fixed the translation on translatewiki.net)
Jun 28 2019
Jun 20 2019
Jun 18 2019
Jun 14 2019
May 31 2019
May 29 2019
Werkzeug 0.15.4 is released and the upstream issue seems to have been resolved.
is not deterministic
May 28 2019
May 25 2019
May 21 2019
May 20 2019
May 19 2019
May 17 2019
Apr 24 2019
Apr 22 2019
Mar 19 2019
I can understand why the page is taking so long to save (it's almost 300KB), but why is it timing out when trying to blank the page? Is MW trying to generate a diff or something like that that requires processing the previous content of the page, too?