Skip to content

list_objects fails in get_etag_element #460

@tmbdev

Description

@tmbdev

Simple list_objects usage fails with the latest Minio server (IP address and keys replaced with dummies).

from minio import Minio
client = Minio("1.1.1.1:9000", access_key="xxxx", secret_key="xxxx", secure=False)
list(client.list_objects("imgclass"))

AttributeError                            Traceback (most recent call last)
<ipython-input-2-eef24a623bf5> in <module>()
      1 client = Minio("1.1.1.1:9000", access_key="xxxx", secret_key="xxxx", secure=False)
----> 2 list(client.list_objects("imgclass"))
from minio import Minio
client = Minio("1.1.1.1:9000", access_key="xxxx", secret_key="xxxx", secure=False)
list(client.list_objects("imgclass"))

AttributeError                            Traceback (most recent call last)
<ipython-input-2-eef24a623bf5> in <module>()
      1 client = Minio("1.1.1.1:9000", access_key="xxxx", secret_key="xxxx", secure=False)
----> 2 list(client.list_objects("imgclass"))

/usr/local/lib/python2.7/dist-packages/minio-2.0.6-py2.7.egg/minio/api.pyc in list_objects(self, bucket_name, prefix, recursive)
    885                                       headers=headers)
    886             objects, is_truncated, marker = parse_list_objects(response.data,
--> 887                                                                bucket_name=bucket_name)
    888             for obj in objects:
    889                 yield obj

/usr/local/lib/python2.7/dist-packages/minio-2.0.6-py2.7.egg/minio/parsers.pyc in parse_list_objects(data, bucket_name)
    233         bucket_name,
    234         root.findall('Contents'),
--> 235         root.findall('CommonPrefixes')
    236     )
    237 

/usr/local/lib/python2.7/dist-packages/minio-2.0.6-py2.7.egg/minio/parsers.pyc in _parse_objects_from_xml_elts(bucket_name, contents, common_prefixes)
    202                content.get_etag_elem(),
    203                content.get_int_elem('Size'))
--> 204         for content in contents
    205     ]
    206 

/usr/local/lib/python2.7/dist-packages/minio-2.0.6-py2.7.egg/minio/parsers.pyc in get_etag_elem(self)
    124 
    125         """
--> 126         return self.get_child_text('ETag').replace('"', '')
    127 
    128     def get_int_elem(self, name):

AttributeError: 'NoneType' object has no attribute 'replace'
/usr/local/lib/python2.7/dist-packages/minio-2.0.6-py2.7.egg/minio/api.pyc in list_objects(self, bucket_name, prefix, recursive)
    885                                       headers=headers)
    886             objects, is_truncated, marker = parse_list_objects(response.data,
--> 887                                                                bucket_name=bucket_name)
    888             for obj in objects:
    889                 yield obj

/usr/local/lib/python2.7/dist-packages/minio-2.0.6-py2.7.egg/minio/parsers.pyc in parse_list_objects(data, bucket_name)
    233         bucket_name,
    234         root.findall('Contents'),
--> 235         root.findall('CommonPrefixes')
    236     )
    237 

/usr/local/lib/python2.7/dist-packages/minio-2.0.6-py2.7.egg/minio/parsers.pyc in _parse_objects_from_xml_elts(bucket_name, contents, common_prefixes)
    202                content.get_etag_elem(),
    203                content.get_int_elem('Size'))
--> 204         for content in contents
    205     ]
    206 

/usr/local/lib/python2.7/dist-packages/minio-2.0.6-py2.7.egg/minio/parsers.pyc in get_etag_elem(self)
    124 
    125         """
--> 126         return self.get_child_text('ETag').replace('"', '')
    127 
    128     def get_int_elem(self, name):

AttributeError: 'NoneType' object has no attribute 'replace'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions