Page MenuHomePhabricator

blockpageschecker.py fails on English Wikipedia
Closed, ResolvedPublic

Description

Firstly, categoryToCheck is set to [[Category:Protected]] which is wrong.

When categoryToCheck is set to [[Category:Wikipedia protected pages]], it gives the following error because it has not been configured for English Wikipedia.

If blockpageschecker.py is run on

Loading [[OMICS Group]]...
Traceback (most recent call last):
  File "pwb.py", line 153, in <module>
    run_python_file(fn, argv, argvu)
  File "pwb.py", line 67, in run_python_file
    exec(compile(source, filename, "exec"), main_mod.__dict__)
  File "scripts/blockpageschecker.py", line 498, in <module>
    main()
  File "scripts/blockpageschecker.py", line 336, in main
    replaceToPerform = u'|'.join(TTP + TSP)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
<type 'exceptions.TypeError'>

Support for English Wikipedia has been disabled since 2008 with this changeset, as 'en' was set to None for all the other configuration fields.

https://mediawiki.org/wiki/Special:Code/pywikipedia/5246


Version: core-(2.0)
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:40 AM
bzimport set Reference to bz68153.
bzimport added a subscriber: Unknown Object (????).

Change 211650 had a related patch set uploaded (by Ladsgroup):
blockpageschecker configuration for English Wikipedia

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

jayvdb set Security to None.

That patch doesnt fix this problem; it still fails in the same place. Here is the run command I used to test, with that patch applied.

$ python pwb.py blockpageschecker -family:wikipedia -lang:en -simulate
Loading categories...
Categories loaded, start!
Retrieving 60 pages from wikipedia:en.
WARNING: API warning (query): Too many values supplied for parameter 'pageids': the limit is 50
Loading [[How to edit]]...
[[How to edit]] is protected: this account can't edit it! Skipping...
Loading [[Arameans]]...
[[Arameans]] is protected: this account can't edit it! Skipping...
Loading [[Al Gore controversies]]...
[[Al Gore controversies]] is protected: this account can't edit it! Skipping...
Loading [[Template:Info]]...
Loading [[Brian Chase (Wikipedia prankster)]]...
[[Brian Chase (Wikipedia prankster)]] is protected: this account can't edit it! Skipping...
Loading [[Brian Chase (Wikipedia hoaxer)]]...
[[Brian Chase (Wikipedia hoaxer)]] is protected: this account can't edit it! Skipping...
Loading [[Brian Chase (hoaxer)]]...
[[Brian Chase (hoaxer)]] is protected: this account can't edit it! Skipping...
Loading [[Template:Fr]]...
Loading [[Template:Infobox Defunct company]]...
Loading [[Template:Clerknote]]...
Loading [[Create article]]...
[[Create article]] is protected: this account can't edit it! Skipping...
Loading [[Create an article]]...
[[Create an article]] is protected: this account can't edit it! Skipping...
Loading [[Create pages]]...
[[Create pages]] is protected: this account can't edit it! Skipping...
Loading [[Darko Trifunović]]...
[[Darko Trifunović]] is protected: this account can't edit it! Skipping...
Loading [[Creating a new page]]...
[[Creating a new page]] is protected: this account can't edit it! Skipping...
Loading [[British India]]...
[[British India]] is protected: this account can't edit it! Skipping...
Loading [[British Student Television]]...
[[British Student Television]] is protected: this account can't edit it! Skipping...
Loading [[Template:Anchors]]...
Loading [[Archimedes Plutonium]]...
[[Archimedes Plutonium]] is protected: this account can't edit it! Skipping...
Loading [[Create a wikipedia page]]...
[[Create a wikipedia page]] is protected: this account can't edit it! Skipping...
Loading [[English English]]...
[[English English]] is protected: this account can't edit it! Skipping...
Loading [[Douchebag]]...
[[Douchebag]] is protected: this account can't edit it! Skipping...
Loading [[Bearded Tit]]...
[[Bearded Tit]] is protected: this account can't edit it! Skipping...
Loading [[Aramean-Syriac people]]...
[[Aramean-Syriac people]] is protected: this account can't edit it! Skipping...
Loading [[*NSYNC]]...
[[*NSYNC]] is protected: this account can't edit it! Skipping...
Loading [[Gallo-Roman]]...
[[Gallo-Roman]] is protected: this account can't edit it! Skipping...
Loading [[9/11]]...
[[9/11]] is protected: this account can't edit it! Skipping...
Loading [[Wikipedia:Article wizard]]...
Loading [[Halo Waypoint]]...
[[Halo Waypoint]] is protected: this account can't edit it! Skipping...
Loading [[Template:Catmain]]...
Loading [[Hoofdpagina]]...
[[Hoofdpagina]] is protected: this account can't edit it! Skipping...
Loading [[ACE Flight 22]]...
[[ACE Flight 22]] is protected: this account can't edit it! Skipping...
Loading [[Blinky Bill's Extraordinary Excursion]]...
[[Blinky Bill's Extraordinary Excursion]] is protected: this account can't edit it! Skipping...
Loading [[Blinky Bill’s Extraordinary Balloon Adventure]]...
[[Blinky Bill’s Extraordinary Balloon Adventure]] is protected: this account can't edit it! Skipping...
Loading [[Create a bio]]...
[[Create a bio]] is protected: this account can't edit it! Skipping...
Loading [[Template:Auto images]]...
Traceback (most recent call last):
  File "pwb.py", line 239, in <module>
    if not main():
  File "pwb.py", line 233, in main
    run_python_file(filename, argv, argvu, file_package)
  File "pwb.py", line 88, in run_python_file
    main_mod.__dict__)
  File "./scripts/blockpageschecker.py", line 497, in <module>
    main()
  File "./scripts/blockpageschecker.py", line 335, in main
    replaceToPerform = u'|'.join(TTP + TSP)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
<type 'exceptions.TypeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

With the latest patch, it still doesnt do the right thing for templates. It outputs...

...
Loading [[Template:Auto images]]...
The page is editable for all, deleting the template...
...

but it doesnt actually edit [[Template:Auto images]]

I think it's another bug, I will create and fix it but it's not related to this one.

jayvdb triaged this task as Low priority.Jun 9 2015, 5:37 AM

Change 211650 merged by jenkins-bot:
Disable blockpageschecker for English Wikipedia

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

Ladsgroup assigned this task to Xqt.