← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1414954] [NEW] Glance image-download .. --progress fails: object of type 'generator' has no len()

 

Public bug reported:

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()

** Affects: glance
     Importance: Undecided
         Status: New

** Attachment added: "Glance logs"
   https://bugs.launchpad.net/bugs/1414954/+attachment/4306381/+files/glance.tar.gz

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1414954

Title:
  Glance image-download .. --progress  fails: object of type 'generator'
  has no len()

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  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()

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1414954/+subscriptions


Follow ups

References