+++ This bug was initially created as a clone of Bug #1186176 +++
Hi,
the bug was fixed in OSP-7, is it possible to backport the fix to OSP-6?
Package versions:
python-glance-2014.2.3-4.el7ost.noarch
python-glanceclient-0.14.2-5.el7ost.noarch
python-glance-store-0.1.10-6.el7ost.noarch
openstack-glance-2014.2.3-4.el7ost.noarch
Thanks,
Ondrej
Description of problem: When downloading a glance image while adding --progress I get an error:
object of type 'generator' has no len()
Same command without --progress works fine.
Version-Release number of selected component (if applicable):
rhel7
python-glance-2014.2.1-2.el7ost.noarch
python-glanceclient-0.14.2-1.el7ost.noarch
python-glance-store-0.1.8-1.el7ost.noarch
openstack-glance-2014.2.1-2.el7ost.noarch
On Icehouse ( python-glanceclient-0.13.1-1.el7ost.noarch
) it works fine, just checked it now.
How reproducible:
Every time, on two separate deployments
Steps to Reproduce:
1. Upload image to glance
2. glance image-download <imageID> --file test.raw --progress - fails
3. Do same without --progress works fine.
4. Also tested with a snapshot of an instance as source same error.
Actual results:
# glance image-download c3d3f.... --file cirros2.raw --progress
object of type 'generator' has no len()
Expected results:
File should download without error and with progress bar indicator
Additional info:
--debug info:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 602, in main
args.func(client, args)
File "/usr/lib/python2.7/site-packages/glanceclient/v1/shell.py", line 151, in do_image_download
body = progressbar.VerboseIteratorWrapper(body, len(body))
TypeError: object of type 'generator' has no len()
object of type 'generator' has no len()
--- Additional comment from Flavio Percoco on 2015-01-27 10:12:13 EST ---
This seems to have been fixed upstream. No need to track it here.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2017-0278.html