Skip to content

'AttributeError' exception is occur at getting bucket information. #1

@userlocalhost

Description

@userlocalhost

When I execute aws.s3_get_bucket action, an 'AttributeError' exception is occur, like following.

vagrant@st2-node:~$ st2 run aws.s3_get_bucket bucket_name=dmzo
.
id: 584bf7486f086f29ffcdd594
status: failed
parameters: 
  bucket_name: dmzo
result: 
  exit_code: 1
  result: None
  stderr: "Traceback (most recent call last):
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 238, in <module>
    obj.run()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 152, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/aws/actions/run.py", line 20, in run
    return self.do_method(module_path, cls, action, **kwargs)
  File "/opt/stackstorm/packs/aws/actions/lib/action.py", line 122, in do_method
    formatted = self.resultsets.formatter(resultset)
  File "/opt/stackstorm/packs/aws/actions/lib/ec2parsers.py", line 204, in formatter
    return self.selector(output)
  File "/opt/stackstorm/packs/aws/actions/lib/ec2parsers.py", line 194, in selector
    return self.parseBucket(output)
  File "/opt/stackstorm/packs/aws/actions/lib/ec2parsers.py", line 247, in parseBucket
    bucket_data = {field: getattr(output, field) for field in FieldLists.BUCKET}
  File "/opt/stackstorm/packs/aws/actions/lib/ec2parsers.py", line 247, in <dictcomp>
    bucket_data = {field: getattr(output, field) for field in FieldLists.BUCKET}
AttributeError: 'Bucket' object has no attribute 'creation_date'
"
  stdout: ''
vagrant@st2-node:~$

But the execution of aws.s3_get_all_buckets is successful.

vagrant@st2-node:~$ st2 run aws.s3_get_all_buckets
.
id: 584bf73c6f086f29ffcdd591
status: succeeded
parameters: None
result: 
  exit_code: 0
  result:
  - LoggingGroup: http://acs.amazonaws.com/groups/s3/LogDelivery
    creation_date: '2016-11-15T10:45:45.000Z'
    name: 20161115-tmp01
  - LoggingGroup: http://acs.amazonaws.com/groups/s3/LogDelivery
    creation_date: '2016-11-15T11:01:05.000Z'
    name: 20161115-tmp02
  - LoggingGroup: http://acs.amazonaws.com/groups/s3/LogDelivery
    creation_date: '2015-11-20T02:58:47.000Z'
    name: dmzo
  - LoggingGroup: http://acs.amazonaws.com/groups/s3/LogDelivery
    creation_date: '2016-11-14T06:58:25.000Z'
    name: hoge-20161114-02
  stderr: ''
  stdout: ''
vagrant@st2-node:~$

This problem may be same with this report.

Thank you.

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