https://bugzilla.wikimedia.org/show_bug.cgi?id=69134
Bug ID: 69134 Summary: delete attempts to recreate deleted page, and fails Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jayvdb@gmail.com Web browser: --- Mobile Platform: ---
If the page is deleted and the bot doesnt have a sysop account, delete.py attempts to recreate it by marking it for deletion.
Without sysop account:
$ python pwb.py delete -page:'Test page' Enter a reason for the deletion: It already is deleted Processing page Test page Can't delete [[en:Test page]]; do you want to mark it for deletion instead? ([Y]es, [N]o, [A]ll) Y Sleeping for 7.0 seconds, 2014-08-05 09:03:50 Traceback (most recent call last): File "pwb.py", line 166, 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/delete.py", line 140, in <module> main() File "scripts/delete.py", line 133, in main bot.run() File "scripts/delete.py", line 75, in run page.delete(self.summary, not self.getOption('always')) File ".../pywikibot/__init__.py", line 476, in wrapper return method(*__args, **__kw) File ".../pywikibot/page.py", line 1475, in delete return self.save(comment=reason) File ".../pywikibot/__init__.py", line 476, in wrapper return method(*__args, **__kw) File ".../pywikibot/page.py", line 942, in save **kwargs) File ".../pywikibot/page.py", line 953, in _save watch=watchval, bot=botflag, **kwargs) File ".../pywikibot/site.py", line 575, in callee return fn(self, *args, **kwargs) File ".../pywikibot/site.py", line 2942, in editpage raise LockedPage(errdata['title']) pywikibot.exceptions.LockedPage: Page Test page is locked. <class 'pywikibot.exceptions.LockedPage'>
https://bugzilla.wikimedia.org/show_bug.cgi?id=69134
--- Comment #1 from John Mark Vandenberg jayvdb@gmail.com --- A slightly different problem, which will likely be fixed at the same time..delete tries to delete a deleted page.
With sysop account:
$ python pwb.py delete -page:'Test page' Enter a reason for the deletion: It already is deleted Processing page Test page Do you want to delete [[en:Test page]]? ([Y]es, [N]o, [A]ll) Y Logging in to wikipedia:en as John Vandenberg Sleeping for 6.1 seconds, 2014-08-05 09:04:49 Traceback (most recent call last): File "pwb.py", line 166, 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/delete.py", line 140, in <module> main() File "scripts/delete.py", line 133, in main bot.run() File "scripts/delete.py", line 75, in run page.delete(self.summary, not self.getOption('always')) File ".../pywikibot/__init__.py", line 476, in wrapper return method(*__args, **__kw) File ".../pywikibot/page.py", line 1457, in delete return self.site.deletepage(self, reason) File ".../pywikibot/site.py", line 575, in callee return fn(self, *args, **kwargs) File ".../pywikibot/site.py", line 3176, in deletepage req.submit() File ".../pywikibot/data/api.py", line 418, in submit raise APIError(code, info, **result["error"]) pywikibot.data.api.APIError: missingtitle: The page you requested doesn't exist <class 'pywikibot.data.api.APIError'>
https://bugzilla.wikimedia.org/show_bug.cgi?id=69134
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |easy
https://bugzilla.wikimedia.org/show_bug.cgi?id=69134
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 170600 had a related patch set uploaded by Mpaa: delete.py: do not attempt to recreate deleted page
https://gerrit.wikimedia.org/r/170600
https://bugzilla.wikimedia.org/show_bug.cgi?id=69134
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=69134
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 170600 merged by jenkins-bot: delete.py: do not attempt to delete not-existing pages
https://gerrit.wikimedia.org/r/170600
https://bugzilla.wikimedia.org/show_bug.cgi?id=69134
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED CC| |mpaa.wiki@gmail.com Resolution|--- |FIXED
pywikipedia-bugs@lists.wikimedia.org