color KeyError problem in _ColorFormatter
Closed, ResolvedPublic

Description

pwb.py interwiki.py -family:wiktionary -continue -lang:tr -cleanup -async -whenneeded:4 -array:250

....
======Post-processing [[tr:Kategori:Cografya (Adigece)]]======
No changes needed on page [[en:Category:ady:Geography]]
Updating links on page [[ru:Kategoriya:Geografiya/ady]].
Changes to be made: Bot: Adding [[en:Category:ady:Geography]], [[ko:bunryu:jiri(
a??ieo)]], [[tr:Kategori:Cografya (Adigece)]]
Dump tr (wiktionary) written.
Traceback (most recent call last):
  File "D:\pwb\pwb.py", line 248, in <module>
    if not main():
  File "D:\pwb\pwb.py", line 242, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "D:\pwb\pwb.py", line 120, in run_python_file
    main_mod.__dict__)
  File ".\scripts\interwiki.py", line 2648, in <module>
    main()
  File ".\scripts\interwiki.py", line 2623, in main
    bot.run()
  File ".\scripts\interwiki.py", line 2367, in run
    self.queryStep()
  File ".\scripts\interwiki.py", line 2345, in queryStep
    subj.finish()
  File ".\scripts\interwiki.py", line 1716, in finish
    if self.replaceLinks(new[site], new):
  File ".\scripts\interwiki.py", line 1961, in replaceLinks
    pywikibot.showDiff(oldtext, newtext)
  File "D:\pwb\pywikibot\__init__.py", line 681, in showDiff
    PatchManager(oldtext, newtext, context=context).print_hunks()
  File "D:\pwb\pywikibot\tools\__init__.py", line 1327, in wrapper
    return obj(*__args, **__kw)
  File "D:\pwb\pywikibot\diff.py", line 264, in __init__
    hunk = Hunk(self.a, self.b, group)
  File "D:\pwb\pywikibot\diff.py", line 69, in __init__
    self.diff_text = u''.join(self.format_diff())
  File "D:\pwb\pywikibot\diff.py", line 128, in format_diff
    yield self.color_line(l1, l2)
  File "D:\pwb\pywikibot\diff.py", line 164, in color_line
    char, self.colors[color])
  File "D:\pwb\pywikibot\tools\formatter.py", line 170, in color_format
    return _ColorFormatter().format(text, *args, **kwargs)
  File "C:\Python27\lib\string.py", line 559, in format
    return self.vformat(format_string, args, kwargs)
  File "D:\pwb\pywikibot\tools\formatter.py", line 152, in vformat
    kwargs)
  File "C:\Python27\lib\string.py", line 563, in vformat
    result = self._vformat(format_string, args, kwargs, used_args, 2)
  File "D:\pwb\pywikibot\tools\formatter.py", line 125, in _vformat
    result = super(_ColorFormatter, self)._vformat(*args, **kwargs)
  File "C:\Python27\lib\string.py", line 585, in _vformat
    obj, arg_used = self.get_field(field_name, args, kwargs)
  File "C:\Python27\lib\string.py", line 646, in get_field
    obj = self.get_value(first, args, kwargs)
  File "D:\pwb\pywikibot\tools\formatter.py", line 79, in get_value
    if key == 'color' and kwargs['color'] in self.colors:
KeyError: u'color'
<type 'exceptions.KeyError'>
CRITICAL: Closing network session.
JAnD created this task.Nov 11 2015, 7:35 AM
JAnD updated the task description. (Show Details)
JAnD raised the priority of this task from to High.
JAnD added a project: Pywikibot.
JAnD added a subscriber: JAnD.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptNov 11 2015, 7:35 AM

Change 252400 had a related patch set uploaded (by John Vandenberg):
Fix tools._ColorFormatter.get_value

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

Change 252400 merged by jenkins-bot:
Fix tools._ColorFormatter.get_value

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

revi set Security to None.
jayvdb renamed this task from interwiki.py and colors problem to color KeyError problem in _ColorFormatter.
jayvdb added subscribers: StudiesWorld, totoazero.
jayvdb reopened this task as Open.Nov 12 2015, 12:59 AM
jayvdb added a subscriber: jayvdb.

Still happening.

This was caused by 9146f171 , and I made a partial fix in ec91fd8e. We may need to back those two out.

Change 252616 had a related patch set uploaded (by John Vandenberg):
Fix Hunk.color_line

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

jayvdb raised the priority of this task from High to Unbreak Now!.Nov 12 2015, 7:42 AM

Change 252616 merged by jenkins-bot:
Fix Hunk.color_line

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

@jayvdb: All patches merged - is this still happening? Should this task still be open?

jayvdb closed this task as Resolved.Nov 30 2015, 11:51 AM
jayvdb claimed this task.

All done; thx for the nudge.

SamanthaNguyen added a subscriber: SamanthaNguyen.

Removing Patch-For-Review since this has already been merged and resolved

Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptJan 2 2017, 4:40 AM

Change 429406 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] docker: tweak quibble MariaDB settings

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

Change 429406 merged by jenkins-bot:
[integration/config@master] docker: enable MariaDB strict mode for Quibble

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

Change 430330 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Bump Quibble jobs to 0.0.11-2

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

Mentioned in SAL (#wikimedia-releng) [2018-05-02T10:43:34Z] <hashar> Building quibble docker iamges 0.0.11-2 T118371 T193222

Change 430330 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Bump Quibble jobs to 0.0.11-2

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

Change 430330 merged by jenkins-bot:
[integration/config@master] Bump Quibble jobs to 0.0.11-2

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