modxevil / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gcloud alpha compute resouce-views #238

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
gcloud alpha compute resource-views cw2-uat

What is the expected output? What do you see instead?
I'm trying to see resouce-views on cw2-uat and I type wrong command at first 
time, and I see the following message:

   ERROR: (gcloud.alpha.compute) Invalid choice: 'resouce-views'. Did you mean 'resource-views'?

Then I send the command again,
"$gcloud alpha compute resource-views cw2-uat"

It returns following message:

Traceback (most recent call last):
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 228, in main
    _cli.Execute()
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 557, in Execute
    args = self.__parser.parse_args(args)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 75, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 66, in parse_known_args
    args, argv = super(ArgumentParser, self).parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1735, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1944, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1900, in consume_positionals
    take_action(action, args)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1809, in take_action
    action(self, namespace, argument_values, option_string)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 287, in __call__
    parser, namespace, values, option_string=option_string)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1111, in __call__
    namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 66, in parse_known_args
    args, argv = super(ArgumentParser, self).parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1735, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1944, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1900, in consume_positionals
    take_action(action, args)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1809, in take_action
    action(self, namespace, argument_values, option_string)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 287, in __call__
    parser, namespace, values, option_string=option_string)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1111, in __call__
    namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 66, in parse_known_args
    args, argv = super(ArgumentParser, self).parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1735, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1944, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1900, in consume_positionals
    take_action(action, args)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1809, in take_action
    action(self, namespace, argument_values, option_string)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 287, in __call__
    parser, namespace, values, option_string=option_string)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1111, in __call__
    namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 66, in parse_known_args
    args, argv = super(ArgumentParser, self).parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1735, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1944, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1900, in consume_positionals
    take_action(action, args)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 1793, in take_action
    argument_values = self._get_values(action, argument_strings)
  File "/Users/el0323/google-cloud-sdk/./lib/argparse/__init__.py", line 2229, in _get_values
    self._check_value(action, value[0])
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 152, in _check_value
    self._calliope_command.LoadAllSubElements()
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 977, in LoadAllSubElements
    element = self.LoadSubElement(name)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1017, in LoadSubElement
    self.SubParser(), parent_group=self)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1069, in __init__
    self._GetModuleFromPath(module_dir, module_path, path, construction_id),
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 746, in _GetModuleFromPath
    name_to_give, os.path.join(module_dir, *module_path))
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/core/util/pkg_resources.py", line 97, in GetModuleFromPath
    module = imp.load_module(name_to_give, f, file_path, items)
  File "/Users/el0323/google-cloud-sdk/./lib/googlecloudsdk/compute/subcommands/resource_views/create.py", line 11, in <module>
    from googlecloudsdk.preview.lib import util
CommandLoadFailure: Problem loading gcloud.alpha.compute.resource-views.create: 
No module named preview.lib.

If you would like to report this issue, please run the following command:
  gcloud feedback

Please provide any additional information below.

Traceback (most recent call last):
  File "googlecloudsdk/calliope/cli.py", line 557, in Execute
    args = self.__parser.parse_args(args)
  File "googlecloudsdk/calliope/backend.py", line 75, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "googlecloudsdk/calliope/backend.py", line 66, in parse_known_args
    args, argv = super(ArgumentParser, self).parse_known_args(args, namespace)
  File "argparse/__init__.py", line 1735, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "argparse/__init__.py", line 1944, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "argparse/__init__.py", line 1900, in consume_positionals
    take_action(action, args)
  File "argparse/__init__.py", line 1809, in take_action
    action(self, namespace, argument_values, option_string)
  File "googlecloudsdk/calliope/backend.py", line 287, in __call__
    parser, namespace, values, option_string=option_string)
  File "argparse/__init__.py", line 1111, in __call__
    namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
  File "googlecloudsdk/calliope/backend.py", line 66, in parse_known_args
    args, argv = super(ArgumentParser, self).parse_known_args(args, namespace)
  File "argparse/__init__.py", line 1735, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "argparse/__init__.py", line 1944, in _parse_known_args
    stop_index = consume_positionals(start_index)
[output truncated]

Original issue reported on code.google.com by lin11...@gmail.com on 4 Sep 2015 at 5:50

GoogleCodeExporter commented 8 years ago
Thanks for reporting this. It's a bug related to the transition of resource 
views from preview to alpha.

Please run `gcloud components update preview`. After this, the command will 
work.

Original comment by z...@google.com on 4 Sep 2015 at 2:54