Bug 737591 - Katello throws error: zero length field name in format in RHEL6.1
Summary: Katello throws error: zero length field name in format in RHEL6.1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: katello-agent
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Katello QA List
URL:
Whiteboard:
: 730841 753217 753220 (view as bug list)
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-09-12 16:10 UTC by Lukas Zapletal
Modified: 2014-09-18 15:32 UTC (History)
4 users (show)

Fixed In Version: katello-cli-0.1.40-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 17:56:47 UTC


Attachments (Terms of Use)

Description Lukas Zapletal 2011-09-12 16:10:04 UTC
Description of problem:
Forteen tests are failing when running CLI test suite on RHEL 6.1. Fedoras are fine.

Steps to Reproduce:
1. run system cli test

stdout:
repo status                             [ FAILED ]
	repo status --id=1315841331683-repo_b5b1b1-org_b5b1b1
	error: zero length field name in format (more in the log file)
--------------------------------------------------------------------------------
                               Repository Status
--------------------------------------------------------------------------------
repo synchronize                        [ OK ]
Test suite activation_key
activation key create                   [ OK ]
list activation keys by environment     [ OK ]
list activation keys by organization    [ OK ]
show activation key                     [ FAILED ]
	activation_key info --org=org_b5b1b1 --name=activation_key_b5b1b1
	error: zero length field name in format (more in the log file)

client.log:
2011-09-12 11:29:44,174 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:29:44,175 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/environment.py", line 99, in run
    self.printer.printItem(env)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

2011-09-12 11:29:45,375 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:29:45,376 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/organization.py", line 106, in run
    self.printer.printItem(org)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

2011-09-12 11:29:46,932 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:29:46,933 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/packagegroup.py", line 79, in run
    self.printer.printItem(info)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

2011-09-12 11:29:47,488 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:29:47,489 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/packagegroup.py", line 138, in run
    self.printer.printItem(info)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

2011-09-12 11:29:49,501 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:29:49,502 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/package.py", line 68, in run
    self.printer.printItem(pack)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

2011-09-12 11:30:14,263 [ERROR][MainThread] error() @ base.py:327 - error: RestClient::InternalServerError: Candlepin::Product: 500 Internal Server Error {"displayMessage":"Runtime Error Error while commiting the transaction at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"} (DELETE /candlepin/products/37069)
2011-09-12 11:30:16,324 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:30:16,325 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/provider.py", line 107, in run
    self.printer.printItem(prov)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

2011-09-12 11:30:17,861 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:30:17,863 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/system.py", line 118, in run
    self.printer.printItem(system)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

2011-09-12 11:30:18,894 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:30:18,895 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/system.py", line 216, in run
    self.printer.printItem(system)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

2011-09-12 11:30:32,332 [ERROR][MainThread] error() @ base.py:174 - zero length field name in format
2011-09-12 11:30:32,333 [ERROR][MainThread] error() @ base.py:175 - Traceback (most recent call last):
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/cli/base.py", line 217, in main
    return command.main(command_args)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 137, in main
    return action.main(args[1:])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/base.py", line 339, in main
    return self.run()
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/user.py", line 109, in run
    self.printer.printItem(users[0])
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 226, in printItem
    self._printItem(item, indent)
  File "/mnt/tests/Kalpana/Installation/PuppetSystemTest/katello/cli/src/katello/client/core/utils.py", line 151, in _printItem
    print ("{:<" + str(colWidth + 1) + "} {}").format(col['name'] + ":", output)
ValueError: zero length field name in format

Comment 2 Tomas Strachota 2011-09-13 11:05:35 UTC
It was a python version problem. String's method 'format' allows to omit position specifiers since 2.7. Added positions to the strings so that we are compatible also with 2.6.

commit fdd2765219019f87c859279c581644c154b9548e
Author: Tomas Strachota <tstrachota@redhat.com>
Date:   Tue Sep 13 10:22:23 2011 +0200

    737591 - format function was missing positional arguments
    method str.format requires positional argument specifiers in Python < 2.7

Comment 3 Tomas Strachota 2011-09-14 08:13:03 UTC
*** Bug 730841 has been marked as a duplicate of this bug. ***

Comment 5 Ivan Necas 2012-02-13 09:48:25 UTC
*** Bug 753217 has been marked as a duplicate of this bug. ***

Comment 6 Ivan Necas 2012-02-13 10:11:02 UTC
*** Bug 753220 has been marked as a duplicate of this bug. ***

Comment 7 Corey Welton 2012-03-09 03:38:56 UTC
Is this a dev tracking task - i.e., can we close it?

Comment 8 Jeff Weiss 2012-03-16 01:31:36 UTC
I don't think so, looks like the error is thrown by the katello cli, not the unit tests.  Asking for info from Tomas where to find passing test results on beaker with this fix in place, then we can close out.

Comment 10 Jeff Weiss 2012-03-16 12:03:35 UTC
Verified.


Note You need to log in before you can comment on or make changes to this bug.