Page MenuHomePhabricator

bots / pagegenerators do not follow pages moved without leaving a redirect
Closed, ResolvedPublicBUG REPORT

Description

When somebody creates page [[Foobar]] and then is page moved to [[Foo (bar)]] (without leaving redirect), bot (newitem.py) crashes:

pwb.py newitem -namespace:0 -newpages:5000 -lang:cs

>>> Artex Informační Systémy s.r.o. <<<
ERROR: Page [[cs:Artex Informační Systémy s.r.o.]] doesn't exist.
Traceback (most recent call last):
  File "I:\py\rewrite\pywikibot\bot.py", line 1219, in run
    self.treat(page, item)
  File ".\scripts\newitem.py", line 75, in treat
    if page.editTime() > self.lastEditBefore:
  File "I:\py\rewrite\pywikibot\tools.py", line 795, in wrapper
    return obj(*new_args, **new_kwargs)
  File "I:\py\rewrite\pywikibot\page.py", line 562, in editTime
    return self.latest_revision.timestamp
  File "I:\py\rewrite\pywikibot\page.py", line 426, in latest_revision
    rev = self.latest_revision_id
  File "I:\py\rewrite\pywikibot\page.py", line 416, in latest_revision_id
    self.site.loadrevisions(self)
  File "I:\py\rewrite\pywikibot\site.py", line 3171, in loadrevisions
    raise NoPage(page)
NoPage: Page [[cs:Artex InformaÄŤnĂ­ SystĂ?my s.r.o.]] doesn't exist.
I:\py\rewrite>

(page was moved to [[cs:Artex informační systémy]])

Event Timeline

JAnD renamed this task from -newpages:n does not get atual name of page to -newpages:n does not get actual name of page.
JAnD raised the priority of this task from to High.
JAnD updated the task description. (Show Details)
JAnD added a project: Pywikibot-pagegenerators.
JAnD set Security to None.
JAnD subscribed.
jayvdb renamed this task from -newpages:n does not get actual name of page to bots / pagegenerators do not follow pages moved without leaving a redirect.Oct 10 2015, 9:27 PM
jayvdb subscribed.

Change 354719 had a related patch set uploaded (by Multichill; owner: Multichill):
[pywikibot/core@master] Page might have been moved without redirect or deleted. Test if the page actually exists.

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

Change 354719 merged by jenkins-bot:
[pywikibot/core@master] Page might have been moved without redirect or deleted. Test if the page actually exists.

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

Again the same:

pwb.py newitem -namespace:0 -subpage:0 -newpages:1500 -lang:cs -maxlag:30 -pageage:21

Script terminated by exception:

ERROR: Page [[cs:Vojtěch Hueber (1948 - 2012)]] doesn't exist. (NoPageError)
Traceback (most recent call last):
  File "I:\pwb\pwb.py", line 487, in <module>
    main()
  File "I:\pwb\pwb.py", line 471, in main
    if not execute():
  File "I:\pwb\pwb.py", line 454, in execute
    run_python_file(filename, script_args, module)
  File "I:\pwb\pwb.py", line 143, in run_python_file
    exec(compile(source, filename, 'exec', dont_inherit=True),
  File ".\scripts\newitem.py", line 232, in <module>
    main()
  File ".\scripts\newitem.py", line 228, in main
    bot.run()
  File "I:\pwb\pywikibot\bot.py", line 1711, in run
    super().run()
  File "I:\pwb\pywikibot\bot.py", line 1619, in run
    if self.skip_page(page):
  File ".\scripts\newitem.py", line 142, in skip_page
    if page.editTime() > self.lastEditBefore:
  File "I:\pwb\pywikibot\page\_pages.py", line 723, in editTime
    return self.latest_revision.timestamp
  File "I:\pwb\pywikibot\page\_pages.py", line 513, in latest_revision
    return next(self.revisions(content=True, total=1))
  File "I:\pwb\pywikibot\page\_pages.py", line 1670, in revisions
    self.site.loadrevisions(self, content=content, rvdir=reverse,
  File "I:\pwb\pywikibot\site\_generators.py", line 747, in loadrevisions
    raise NoPageError(page)
pywikibot.exceptions.NoPageError: Page [[cs:Vojtěch Hueber (1948 - 2012)]] doesn't exist.
CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.NoPageError'>
Xqt changed the subtype of this task from "Task" to "Bug Report".
Xqt added a subscriber: Multichill.

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

[pywikibot/core@master] [bugfix] Call ExistingPageBot.skip_page() first

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

Change 789984 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Call ExistingPageBot.skip_page() first

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