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 #173

Open hauboldj opened 7 years ago

hauboldj commented 7 years ago

I'm in the preview for a new AWS service, and have added the cli models for that service. I get the following error when running aws-shell.

$ aws-shell
First run, creating autocomplete index...
Traceback (most recent call last):
  File "/usr/local/bin/aws-shell", line 9, in <module>
    load_entry_point('aws-shell==0.1.1', '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 67, in write_index
    index_command(current, help_command)
  File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 59, in index_command
    index_command(child, sub_help_command)
  File "/Library/Python/2.7/site-packages/awsshell/makeindex.py", line 58, in index_command
    sub_help_command = sub_command.create_help_command()
  File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 514, in create_help_command
    arg_table=self.arg_table,
  File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 453, in arg_table
    self._arg_table = self._create_argument_table()
  File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 550, in _create_argument_table
    input_shape = self._operation_model.input_shape
  File "/Library/Python/2.7/site-packages/botocore/utils.py", line 522, in __get__
    computed_value = self._fget(obj)
  File "/Library/Python/2.7/site-packages/botocore/model.py", line 406, in input_shape
    self._operation_model['input'])
  File "/Library/Python/2.7/site-packages/botocore/model.py", line 246, in resolve_shape_ref
    return self._shape_resolver.resolve_shape_ref(shape_ref)
  File "/Library/Python/2.7/site-packages/botocore/model.py", line 507, in resolve_shape_ref
    return self.get_shape_by_name(shape_ref['shape'])
  File "/Library/Python/2.7/site-packages/botocore/model.py", line 485, in get_shape_by_name
    raise NoShapeFoundError(shape_name)
botocore.model.NoShapeFoundError: NameOfApiCallForServiceInPreviewHere

I guess ideally the autocomplete indexer would just skip these cli models.

joguSD commented 6 years ago

To start things off, are you still having this issue? I think the best course of action is to notify the team responsible for the model and have them fix it. As a temporary workaround I suppose you could remove the broken operation. Ideally, broken models will never be distributed. At the same time I can definitely see the frustration in one broken model stopping the use of the shell as a whole.

trek10-gr1ct commented 6 years ago

No, I deleted the models from the broken service. I have not tried again since then.