awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.15k stars 770 forks source link

Error on first run - TypeError: generate_shorthand_example() takes exactly 4 arguments (3 given) #118

Closed Garvice closed 8 years ago

Garvice commented 8 years ago

$ aws-shell First run, creating autocomplete index... Traceback (most recent call last): File "/usr/local/bin/aws-shell", line 11, in sys.exit(main()) File "/Library/Python/2.7/site-packages/awsshell/init.py", line 47, in main write_index(index_file) File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 63, in write_index index_command(current, help_command) File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 55, in index_command index_command(child, sub_help_command) File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 55, in index_command index_command(child, sub_help_command) File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 43, in index_command arg, arg_obj.argument_model) TypeError: generate_shorthand_example() takes exactly 4 arguments (3 given)

chrisolido commented 8 years ago

sudo aws-shell First run, creating autocomplete index... Traceback (most recent call last): File "/usr/local/bin/aws-shell", line 9, in load_entry_point('aws-shell==0.1.0', 'console_scripts', 'aws-shell')() File "/Library/Python/2.7/site-packages/awsshell/init.py", line 47, in main write_index(index_file) File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 63, in write_index index_command(current, help_command) File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 55, in index_command index_command(child, sub_help_command) File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 55, in index_command index_command(child, sub_help_command) File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 43, in index_command arg, arg_obj.argument_model) TypeError: generate_shorthand_example() takes exactly 4 arguments (3 given)

jordanfarrer commented 8 years ago

Just upgraded to latest version and now I'm getting the following:

$ aws-shell First run, creating autocomplete index... Traceback (most recent call last): File "/usr/local/bin/aws-shell", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/site-packages/awsshell/init.py", line 47, in main write_index(index_file) File "/usr/local/lib/python2.7/site-packages/awsshell/makeindex.py", line 63, in write_index index_command(current, help_command) File "/usr/local/lib/python2.7/site-packages/awsshell/makeindex.py", line 55, in index_command index_command(child, sub_help_command) File "/usr/local/lib/python2.7/site-packages/awsshell/makeindex.py", line 55, in index_command index_command(child, sub_help_command) File "/usr/local/lib/python2.7/site-packages/awsshell/makeindex.py", line 43, in index_command arg, arg_obj.argument_model) TypeError: generate_shorthand_example() takes exactly 4 arguments (3 given)

donnemartin commented 8 years ago

@jamesls this seems to be caused by https://github.com/aws/aws-cli/commit/4c2c2a746013e02619fbecec1c27e39f34adb182 with generate_shorthand_example now requiring operation_name?

Traceback (most recent call last):
  File "/Users/donnemartin/.virtualenvs/aws-shell-test/bin/aws-shell", line 11, in <module>
    sys.exit(main())
  File "/Users/donnemartin/.virtualenvs/aws-shell-test/lib/python3.5/site-packages/awsshell/__init__.py", line 47, in main
    write_index(index_file)
  File "/Users/donnemartin/.virtualenvs/aws-shell-test/lib/python3.5/site-packages/awsshell/makeindex.py", line 63, in write_index
    index_command(current, help_command)
  File "/Users/donnemartin/.virtualenvs/aws-shell-test/lib/python3.5/site-packages/awsshell/makeindex.py", line 55, in index_command
    index_command(child, sub_help_command)
  File "/Users/donnemartin/.virtualenvs/aws-shell-test/lib/python3.5/site-packages/awsshell/makeindex.py", line 55, in index_command
    index_command(child, sub_help_command)
  File "/Users/donnemartin/.virtualenvs/aws-shell-test/lib/python3.5/site-packages/awsshell/makeindex.py", line 43, in index_command
    arg, arg_obj.argument_model)
TypeError: generate_shorthand_example() missing 1 required positional argument: 'operation_name'
jamesls commented 8 years ago

Ah ok, let me follow up and get that fixed. Thanks for looking into this.

jamesls commented 8 years ago

Fixed via https://github.com/awslabs/aws-shell/pull/119