python-novaclient 1:2012.1~e4-1 on wheezy

Asked by vladimirnikolic

Hello,

nova client doesn't work on my Debian Wheezy.
Every command gives the same error:

ERROR: printt

Here is debug output for 'nova image-list' ('glance index' shows three testing images):

# nova --debug image-list

connect: (192.168.0.1, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 192.168.0.1:5000\r\nContent-Length: 114\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "openstackDemo", "passwordCredentials": {"username": "adminUser", "password": "somepassword"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Date: Mon, 28 May 2012 21:43:50 GMT
header: Transfer-Encoding: chunked
connect: (192.168.0.1, 8774)
send: u'GET /v2/4b52eb4c8f284725806fd7917eaa8d61/images/detail HTTP/1.1\r\nHost: 192.168.0.1:8774\r\nx-auth-project-id: openstackDemo\r\nx-auth-token: 7b956feb7c2a4c899f3a18918a69fbc0\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-3579f481-61f9-4c27-ba7b-7b323e4824ef
header: Content-Type: application/json
header: Content-Length: 2166
header: Date: Mon, 28 May 2012 21:43:50 GMT
DEBUG (shell:394) printt
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 391, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 342, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 304, in do_image_list
    utils.print_list(image_list, ['ID', 'Name', 'Status', 'Server'], fmts)
  File "/usr/lib/python2.7/dist-packages/novaclient/utils.py", line 143, in print_list
    pt.printt(sortby=fields[0])
  File "/usr/lib/pymodules/python2.7/prettytable.py", line 163, in __getattr__
    raise AttributeError(name)
AttributeError: printt
ERROR: printt

I can get list of images with 'curl X-Auth-Token' on http://192.168.0.1:8774/v2/tenant_id/images/detail

Regards

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jered Heeschen (jered-heeschen) said :
#1

When PrettyTable got updated to 0.6 it looks like it removed the "printt" function. A workaround for now is to downgrade PrettyTable to 0.5 to get the client working.

Revision history for this message
Michael Lin (michael-lin) said :
#2

I have the same problem as you describe.

Can you teach me how to downgrade the module? Thank a lot!

Michael Lin 20120709

Revision history for this message
Michael Lin (michael-lin) said :
#3

Sorry for one thing, the OS is Ubuntu 12.04.

Many thanks :D

Revision history for this message
Sam Stoelinga (sammiestoel) said :
#4

To downgrade the module, you can use the following command:

pip install prettytable==0.5 or easy_install prettytable==0.5

If it was installed system wide you may first need to sudo apt-get remove python-prettytable.

Revision history for this message
Shawn Hartsock (hartsock) said :
#5

I now get this error from glance:

Traceback (most recent call last):
  File "/usr/local/bin/glance", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2809, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 594, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: prettytable>=0.6,<0.7

Revision history for this message
Shawn Hartsock (hartsock) said :
#6

Okay, the fix was to use pip to upgrade python-novaclient and python-glanceclient each of which then upgraded a list of dependencies and this seems stable.

Can you help with this problem?

Provide an answer of your own, or ask vladimirnikolic for more information if necessary.

To post a message you must log in.