Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using --no-paginate with aws cloudformation describe-stacks throws error #1993

Closed
jszwedko opened this issue May 27, 2016 · 4 comments
Closed
Labels
bug This issue is a bug.

Comments

@jszwedko
Copy link

Version: aws-cli/1.10.34 Python/2.7.9 Linux/3.16.0-4-amd64 botocore/1.4.24

When I attempt to run aws cloudformation describe-stacks --no-paginate --region us-west-2 I receive:

'Namespace' object has no attribute 'page_size'

This does not happen if I do not use the --no-paginate flag.

@jszwedko jszwedko changed the title Using --no-paginate with aws cloudformation describe-stacks cases error Using --no-paginate with aws cloudformation describe-stacks throws error May 27, 2016
@jszwedko
Copy link
Author

https://forums.aws.amazon.com/thread.jspa?threadID=231962 appears to be a similar issue

@jamesls
Copy link
Member

jamesls commented May 27, 2016

Confirmed bug, full traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/awscli/clidriver.py", line 186, in main
    return command_table[parsed_args.command](remaining, parsed_args)
  File "/usr/local/lib/python2.7/site-packages/awscli/clidriver.py", line 379, in __call__
    return command_table[parsed_args.operation](remaining, parsed_globals)
  File "/usr/local/lib/python2.7/site-packages/awscli/clidriver.py", line 518, in __call__
    parsed_globals=parsed_globals)
  File "/usr/local/lib/python2.7/site-packages/awscli/clidriver.py", line 621, in _emit
    return self._session.emit(name, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/botocore/session.py", line 683, in emit
    return self._events.emit(event_name, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/botocore/hooks.py", line 227, in emit
    return self._emit(event_name, kwargs)
  File "/usr/local/lib/python2.7/site-packages/botocore/hooks.py", line 210, in _emit
    response = handler(**kwargs)
  File "/usr/local/lib/python2.7/site-packages/awscli/customizations/paginate.py", line 189, in check_should_enable_pagination
    ensure_paging_params_not_set(parsed_args, shadowed_args)
  File "/usr/local/lib/python2.7/site-packages/awscli/customizations/paginate.py", line 196, in ensure_paging_params_not_set
    p not in shadowed_params and getattr(parsed_args, p)]
AttributeError: 'Namespace' object has no attribute 'page_size'

Seems to be caused by: #1958

cc @JordonPhillips

@jamesls jamesls added the bug This issue is a bug. label May 27, 2016
@jszwedko
Copy link
Author

Indeed, this issue appears to have been introduced by 12aa790.

@jamesls
Copy link
Member

jamesls commented May 27, 2016

#1994 should fix the issue.

JordonPhillips added a commit to JordonPhillips/aws-cli that referenced this issue Jun 2, 2016
When checking to make sure that no paging params are set, we
did not account for the possibility that page size isn't present
for a given operation. Thus, errors would be raised when
`--no-paginate` was supplied on operations without it. This sets
a default value to the getattr call to prevent the error.

Fixes aws#1993
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants