Page MenuHomePhabricator

not enough arguments for format string
Closed, InvalidPublic

Description

pwb.py interwiki.py -family:wiktionary -lang:cs Kategorie:Angličtina -async -cleanup -whenneeded:5

In roa-rup.wiktonary was renamed category. Now is marked with {{delete}} and bot find two possibilities
After selecting one bot tries to update wikis and crashes

What should be done? ([A]ccept, [r]eject, [g]ive up, accept a[l]l): l
No changes needed on page [[cs:Kategorie:Angličtina]]
No changes needed on page [[mg:Sokajy:anglisy]]
Dump cs (wiktionary) appended.
Traceback (most recent call last):
  File "D:\pwb\pwb.py", line 239, in <module>
    if not main():
  File "D:\pwb\pwb.py", line 233, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "D:\pwb\pwb.py", line 111, in run_python_file
    main_mod.__dict__)
  File ".\scripts\interwiki.py", line 2641, in <module>
    main()
  File ".\scripts\interwiki.py", line 2616, in main
    bot.run()
  File ".\scripts\interwiki.py", line 2360, in run
    self.queryStep()
  File ".\scripts\interwiki.py", line 2338, in queryStep
    subj.finish()
  File ".\scripts\interwiki.py", line 1713, in finish
    if self.replaceLinks(new[site], new):
  File ".\scripts\interwiki.py", line 1901, in replaceLinks
    insite=page.site)
  File ".\scripts\interwiki.py", line 2412, in compareLanguages
    mcomment += i18n.twtranslate(insite, commentname, changes)
  File "D:\pwb\pywikibot\i18n.py", line 510, in twtranslate
    return trans % parameters
TypeError: not enough arguments for format string
<type 'exceptions.TypeError'>
CRITICAL: Closing network session.

Event Timeline

JAnD raised the priority of this task from to Medium.
JAnD updated the task description. (Show Details)
JAnD subscribed.

Is your scripts/i18n/ subdirectory up to date? We have been eradicating %s inside the translations which is causing this exception.

Is your scripts/i18n/ subdirectory up to date? We have been eradicating %s inside the translations which is causing this exception.

yes, If is i18n directory updated with svn together with rest of pywikibot
no, if is not included.

Seems the translation at twn is/was wrong.

Xqt lowered the priority of this task from Medium to Low.Mar 17 2016, 4:30 PM

Can't reproduce this bug except the code was older than this commit:
rPWBC4b1dc6a2bf52069e641a90b6dfd114063bbf6699

Xqt changed the task status from Open to Stalled.Aug 23 2016, 1:38 PM
Xqt lowered the priority of this task from Low to Lowest.

can't reproduce this.

might be a twn issue and already solved.