Page MenuHomePhabricator

redirect.py depends on extension:WikiEditor being installed
Closed, ResolvedPublic

Description

Traceback (most recent call last):

File "C:\rewrite\pwb.py", line 178, in <module>
  run_python_file(fn, argv, argvu)
File "C:\rewrite\pwb.py", line 75, in run_python_file
  exec(compile(source, filename, "exec"), main_mod.__dict__)
File "C:\rewrite\scripts\redirect.py", line 814, in <module>
  main()
File "C:\rewrite\scripts\redirect.py", line 811, in main
  bot.run()
File "C:\rewrite\scripts\redirect.py", line 714, in run
  self.fix_double_redirects()
File "C:\rewrite\scripts\redirect.py", line 526, in fix_double_redirects
  self.fix_1_double_redirect(redir_name)
File "C:\rewrite\scripts\redirect.py", line 597, in fix_1_double_redirect
  'wikieditor-toolbar-tool-redirect-example')
File "C:\rewrite\pywikibot\site.py", line 1807, in mediawiki_message
  return self.mediawiki_messages([key])[key]
File "C:\rewrite\pywikibot\site.py", line 1795, in mediawiki_messages
  % locals())

KeyError: "Site local:en has no message 'wikieditor-toolbar-tool-redirect-exam
ple'"
<type 'exceptions.KeyError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort


Version: compat-(1.0)
Severity: normal

Event Timeline

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

Could you provide the query result? The parameters are the following: api.php?action=query&meta=allmessages&ammessages=wikieditor-toolbar-tool-redirect-example&amlang=en

{
"query": {

		"allmessages": [
			{
				"name": "wikieditor-toolbar-tool-redirect-example",
				"missing": ""
			}
		]

}
}

gerritadmin wrote:

Change 168728 had a related patch set uploaded by XZise:
[FIX] Redirect: Allow missing toolbar example

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

Actually this bug is bigger, it relies on an extension:WikiEditor for translating instead of core mediawiki

gerritadmin wrote:

Change 168728 merged by jenkins-bot:
[FIX] Redirect: Allow missing toolbar example

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

bug fixed in core; the same bug exists in the same script in compat.

import wikipedia.py
from wikipedia import pywikibot
s = pywikibot.Site('en', 'lyricwiki')
s.mediawiki_message('wikieditor-toolbar-tool-redirect-example')

Traceback (most recent call last):

File "<stdin>", line 1, in <module>
File "wikipedia.py", line 7645, in mediawiki_message
  raise KeyError("message '%s' does not exist." % key)

KeyError: "message 'wikieditor-toolbar-tool-redirect-example' does not exist."

Change 211659 had a related patch set uploaded (by Xqt):
[FIX] Redirect: Allow missing toolbar example

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

Change 211659 merged by jenkins-bot:
[FIX] Redirect: Allow missing toolbar example

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

Aklapper triaged this task as Lowest priority.Jun 5 2015, 1:41 PM
Aklapper subscribed.

Pywikibot has two versions: Compat and Core. This task was filed about the older version, called Pywikibot-compat, which is not under active development anymore. Hence I'm lowering the priority of this task to reflect the reality. Unfortunately, the Pywikibot team does not have the manpower to retest every single bug report / feature request against the (maintained) Pywikibot code base. Furthermore, the code base of Pywikibot-Compat has changed a lot compared to the code base of Pywikibot-Core so there is a chance that the problem described in this task might not exist anymore. Please help: Unfortunately manpower is limited and does not allow testing every single reported task again. If you have time and interest in Pywikibot, please upgrade to Pywikibot-Core and add a comment to this task if the problem in this task still happens in Pywikibot-Core (or directly edit the task by removing the Pywikibot-compat project and adding the Pywikibot project to this task). To learn more about Pywikibot and to get involved in its development, please check out https://www.mediawiki.org/wiki/Manual:Pywikibot/Development Thank you for your understanding.

Xqt claimed this task.