Last modified: 2014-11-03 22:33:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71134, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69134 - delete attempts to recreate deleted page, and fails
delete attempts to recreate deleted page, and fails
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-05 02:07 UTC by John Mark Vandenberg
Modified: 2014-11-03 22:33 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-08-05 02:07:43 UTC
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'>
Comment 1 John Mark Vandenberg 2014-08-05 02:09:20 UTC
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'>
Comment 2 Gerrit Notification Bot 2014-11-02 20:28:01 UTC
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
Comment 3 Gerrit Notification Bot 2014-11-03 21:06:26 UTC
Change 170600 merged by jenkins-bot:
delete.py: do not attempt to delete not-existing pages

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links