Page MenuHomePhabricator

Pywikibot does not treat titleblacklist errors as a any sort of 'page not saved' or 'spam filter' errors, crashing replace.py
Closed, ResolvedPublic

Description

This is part of KolbertBot's logs:

1No changes were necessary in [[Brandon Pollard]]
2 ***
3
4>>> Template:Editnotices/Page/A.W. Peet <<< ***
5@@ -3 +3 @@ ***
6- |source = http://web.archive.org/web/20171114145547/http://ap.io/g/ ***
7+ |source = https://web.archive.org/web/20171114145547/http://ap.io/g/ ***
8
9WARNING: API error titleblacklist-forbidden: ⧼titleblacklist-custom-editnotice⧽
10Traceback (most recent call last):
11 File "/shared/pywikipedia/core/pwb.py", line 264, in <module>
12 if not main():
13 File "/shared/pywikipedia/core/pwb.py", line 257, in main
14 run_python_file(filename, [filename] + args, argvu, file_package)
15 File "/shared/pywikipedia/core/pwb.py", line 120, in run_python_file
16 main_mod.__dict__)
17 File "/shared/pywikipedia/core/scripts/replace.py", line 1191, in <module>
18 main()
19 File "/shared/pywikipedia/core/scripts/replace.py", line 1182, in main
20 bot.run()
21 File "/shared/pywikipedia/core/scripts/replace.py", line 819, in run
22 callback=self._replace_sync_callback, quiet=True)
23 File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/tools/__init__.py", line 1520, in wrapper
24 return obj(*__args, **__kw)
25 File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/tools/__init__.py", line 1520, in wrapper
26 return obj(*__args, **__kw)
27 File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/page.py", line 1262, in save
28 cc=apply_cosmetic_changes, quiet=quiet, **kwargs)
29 File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/page.py", line 136, in wrapper
30 handle(func, self, *args, **kwargs)
31 File "/mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/page.py", line 130, in handle
32 callback(self, err)
33 File "/shared/pywikipedia/core/scripts/replace.py", line 684, in _replace_sync_callback
34 raise err
35pywikibot.data.api.APIError
36CRITICAL: Closing network session.
37[2018-28-01T04:25] /bin/bash exited with code 1. Respawning...
38No handlers could be found for logger "pywiki"
39Retrieving 50 pages from wikipedia:en.
40No changes were necessary in [[List of comedy television series]]

replace.py is supposed to catch some similar errors, but it did not for this one