[go: up one dir, main page]

Page MenuHomePhabricator

patrol.py reports patrol disabled when it isn't
Open, HighPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • python pwb.py patrol -lang:nl -family:wiktionary -newpages -pt:1

What happens?:

Recentchanges:
Loading Gebruiker:Bitbotje/patrol_whitelist
WARNING: API error patroldisabled: Recent changes patrol disabled

Then it proceeds to patrol recent changes except new pages.

What should have happened instead?:
Patrolling is not disabled on this wiki, I can still patrol new pages in the web interface. So it should have patrolled the new pages according to Gebruiker:Bitbotje/patrol whitelist.

Software version (skip for WMF-hosted wikis like Wikipedia):
pywikibot 8.2.0 (stable)

Other information (browser name/version, screenshots, etc.):
I think this started happening after the last update of pywikibot.

Event Timeline

Xqt triaged this task as High priority.Jul 15 2023, 1:21 PM

Change 938363 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Only handle namespaces with pagegenerators.GeneratorFactory()

https://gerrit.wikimedia.org/r/938363

Change 938363 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Only handle namespaces with pagegenerators.GeneratorFactory()

https://gerrit.wikimedia.org/r/938363

@Bdijkstra: This is solved in the current master release. Is it necessary to backport it to the stable release?

@Xqt: I switched to master and my daily and weekly scripts ran fine, so no further action necessary.

Change 942375 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@stable] [8.2.1] Publish Pywikibot 8.2.1 stable release

https://gerrit.wikimedia.org/r/942375

Change 942375 abandoned by Xqt:

[pywikibot/core@stable] [8.2.1] Publish Pywikibot 8.2.1 stable release

Reason:

too many backports necessary

https://gerrit.wikimedia.org/r/942375

Now running 8.4.0 stable, and it's very confusing/frustrating:

$ python pwb.py login -site:wikidata -user:Bdijkstra 
Logged in on wikidata:wikidata as Bdijkstra.

Execution time: 0 seconds
$ python pwb.py -user:Bdijkstra scripts/userscripts/...
Password for user Bitbotje on wikidata:wikidata (no characters will be shown):

Grr, I don't want that. I guess I should specify the site:

$ python pwb.py -user:Bdijkstra -site:wikidata scripts/userscripts/

But then the page is saved as HernoemBot instead! Sigh, so let's log out of that account:

$ python pwb.py login -site:wikidata -user:HernoemBot -logout
Password for user HernoemBot on wikidata:wikidata (no characters will be shown):

Grr, why do I have to enter the password while I'm logged in? Anyway, let's try again:

$ python pwb.py -user:Bdijkstra -site:wikidata scripts/userscripts/...
...
KeyError: "Invalid token 'csrf' for user 'Bdijkstra' on wikidata:wikidata wiki."
CRITICAL: Exiting due to uncaught exception KeyError: "Invalid token 'csrf' for user 'Bdijkstra' on wikidata:wikidata wiki."

...
Maybe this is related to T343187: Problems with logging in?

Edit: performed a successful edit as Bitbotje today, then tried the above command line again, which ended the same but started with: ERROR: Logged in as '2A02:XXXX:XXXX:1:92E9:D1F1:1FCA:7095' instead of 'Bdijkstra'. Forcing re-login.

Edit2: performed a few edits as HernoemBot, now getting ERROR: User assertion failed. Forcing re-login. every other edit or so.

Edit3: after a day of editing, now consistently getting KeyError: "Invalid token 'csrf' for user 'HernoemBot' on wikidata:wikidata wiki."

Also, I'm getting the error User "None" does not have required user right "patrol" again on Pywikibot 8.4.0.dev3.

Edit: and a day later it runs fine again, on the same Pywikibot version.