镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

AttributeError: 'module' object has no attribute 'bucket' #3

Closed

Description

@AndyMoore111
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)
+ 9 more lines
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 193, in selector
    elif isinstance(output, s3.bucket.Bucket):
AttributeError: 'module' object has no attribute 'bucket'

Seeing hte above error when running aws.cf_create_stack

using 0.7.3

Activity

  1. AndyMoore111 commented on Dec 14, 2016

    @AndyMoore111
    Author

    StackStorm/st2contrib#637 (comment)

    fixed in st2contrib it seems

  2. xydinesh commented on Jan 11, 2017

    @xydinesh

    As a workaround, I downgraded to 0.7.0 and worked fine.

    st2 pack install aws=0.7.0

  3. userlocalhost commented on Jan 12, 2017

    @userlocalhost
    Collaborator

    Yes, This problem appear from v0.7.1 to v0.7.3.

    But now, this is corrected by #4. We can handle 'Bucket' object at the latest version, like this.

    vagrant@st2-node:~$ st2 pack get aws
    +-------------+--------------------------------------------------------------+
    | Property    | Value                                                        |
    +-------------+--------------------------------------------------------------+
    | name        | aws                                                          |
    | version     | 0.7.4                                                        |
    | author      | StackStorm, Inc.                                             |
    | email       | info@stackstorm.com                                          |
    | keywords    | [                                                            |
    |             |     "aws",                                                   |
    |             |     "amazon web services",                                   |
    |             |     "amazon",                                                |
    |             |     "ec2",                                                   |
    |             |     "sqs",                                                   |
    |             |     "sns",                                                   |
    |             |     "route53",                                               |
    |             |     "cloud",                                                 |
    |             |     "iam",                                                   |
    |             |     "vpc",                                                   |
    |             |     "s3",                                                    |
    |             |     "CloudFormation",                                        |
    |             |     "RDS",                                                   |
    |             |     "SQS"                                                    |
    |             | ]                                                            |
    | description | st2 content pack containing Amazon Web Services              |
    |             | integrations.                                                |
    +-------------+--------------------------------------------------------------+
    vagrant@st2-node:~$ st2 run aws.s3_get_all_buckets
    .
    id: 5876e8176f086f25b054369c
    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: '2016-11-14T06:58:25.000Z'
        name: hoge-20161114-02
      stderr: ''
      stdout: ''
    vagrant@st2-node:~$ 
    

    This issue has already been finished.
    @emedvedev, Would you please close it?

  4. xydinesh commented on Jan 12, 2017

    @xydinesh

    Well, for me it is not fixed in 0.7.4, I got following error when calling

    st2 run aws.vpc_create_tags resource_ids="vpc-68984b01" tags="Name=Test"

    ubuntu@ip-172-30-0-134:~$ st2 execution get 5876f4103aae7b59a0d0725e
    id: 5876f4103aae7b59a0d0725e
    status: failed (1s elapsed)
    parameters:
    resource_ids: vpc-68984b01
    tags: Name=NibiruTestVPC
    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 242, in
    obj.run()
    File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 154, 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 193, in selector
    elif isinstance(output, s3.bucket.Bucket):
    AttributeError: 'module' object has no attribute 'bucket'
    "
    stdout: ''

  5. userlocalhost commented on Jan 12, 2017

    @userlocalhost
    Collaborator

    @xydinesh, thank you for your reply.

    File "/opt/stackstorm/packs/aws/actions/lib/ec2parsers.py", line 193, in selector
    elif isinstance(output, s3.bucket.Bucket):
    AttributeError: 'module' object has no attribute 'bucket'

    Your 'aws' pack seems old because the target line is corrected like this in the latest version.

    Could you please update your 'aws' pack to the latest version?

  6. xydinesh commented on Jan 12, 2017

    @xydinesh

    I see it is fixed on master but not on 0.7.4. If I do

    st2 pack install aws

    It installs 0.7.4, How do I install the latest ?

  7. emedvedev commented on Jan 12, 2017

    @emedvedev
    Contributor

    @xydinesh I've bumped the version tag, so that the latest is now 0.7.5. It has all the recent changes and should work fine. Could you please try to install the latest again and confirm?

    By the way, st2 pack install aws should always install the latest master. It's possible you haven't reloaded the pack content after installation, or the pack failed to update for you. If the things aren't fixed for you in 0.7.5 (or if 0.7.5 isn't installed with st2 pack install aws), try removing the pack, reloading all content with st2ctl reload --register-all, installing the pack, and reloading again.

  8. xydinesh commented on Jan 12, 2017

    @xydinesh

    It installs 0.7.5 now and issue is fixed. Thanks!

  9. emedvedev commented on Jan 12, 2017

    @emedvedev
    Contributor

    Awesome. Closing the issue.

  10. added a commit that references this issue on May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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