TypeError - not enough args for format string in i18n_cfg.py

Bug #1263813 reported by Jay Pipes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Unassigned

Bug Description

jpipes@uberbox:~/repos/openstack/neutron$ git log --oneline | head -1
84aeb9a Merge "Imported Translations from Transifex"

Running tox -eALL resulted in:

i18n runtests: commands[0] | python ./tools/check_i18n.py ./neutron ./tools/i18n_cfg.py
Traceback (most recent call last):
  File "./tools/check_i18n.py", line 151, in <module>
    debug):
  File "./tools/check_i18n.py", line 112, in check_i18n
    ASTWalker())
  File "/usr/lib/python2.7/compiler/visitor.py", line 106, in walk
    walker.preorder(tree, visitor)
  File "/usr/lib/python2.7/compiler/visitor.py", line 63, in preorder
    self.dispatch(tree, *args) # XXX *args make sense?
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 38, in default
    compiler.visitor.ASTVisitor.default(self, node, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 40, in default
    self.dispatch(child, *args)
  File "/usr/lib/python2.7/compiler/visitor.py", line 57, in dispatch
    return meth(node, *args)
  File "./tools/check_i18n.py", line 62, in visitConst
    self.lines[node.lineno - 1][:-1], msg),
TypeError: not enough arguments for format string
ERROR: InvocationError: '/home/jpipes/repos/openstack/neutron/.tox/i18n/bin/python ./tools/check_i18n.py ./neutron ./tools/i18n_cfg.py'

Changed in neutron:
status: New → Confirmed
importance: Undecided → Low
ZhiQiang Fan (aji-zqfan)
Changed in neutron:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Revision history for this message
Oleg Bondarev (obondarev) wrote :

Actually there is a patch on review already: https://review.openstack.org/#/c/63858/

ZhiQiang Fan (aji-zqfan)
Changed in neutron:
assignee: ZhiQiang Fan (aji-zqfan) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/63858
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=f778931252fbee34980e32289e96534eebb89c2b
Submitter: Jenkins
Branch: master

commit f778931252fbee34980e32289e96534eebb89c2b
Author: Jay Pipes <email address hidden>
Date: Mon Dec 23 20:58:31 2013 -0500

    Corrects broken format strings in check_i18n.py

    In tools/check_i18n.py, the error messages printed out
    had format strings that included 5 interpolations, but only
    four variables were supplied. This patch simply corrects that
    mismatch by including the name of the predicate or checker
    that failed.

    Closes-Bug: #1263813
    Change-Id: I5cacee9ea000f56a9ef45f07367e85f20fa333c7

Changed in neutron:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers