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

Namespace' object has no attribute '_cmd' error on create-remote-connection on macOS and Python 3.9.8 #20330

Closed
jasperdy opened this issue Nov 15, 2021 · 3 comments
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Web Apps az webapp

Comments

@jasperdy
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az webapp create-remote-connection

Errors:

The command failed with an unexpected error. Here is the traceback:
'Namespace' object has no attribute '_cmd'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 582, in execute
    parsed_args = self.parser.parse_args(args)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/knack/parser.py", line 260, in parse_args
    return super().parse_args(args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1822, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2064, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2004, in consume_optional
    take_action(action, args, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/arm.py", line 357, in __call__
    profile = Profile(cli_ctx=namespace._cmd.cli_ctx)  # pylint: disable=protected-access
AttributeError: 'Namespace' object has no attribute '_cmd'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az webapp create-remote-connection --resource-group {} --subscription {} --name {}

Expected Behavior

Environment Summary

macOS-11.5.2-x86_64-i386-64bit, Darwin 20.6.0
Python 3.9.8
Installer: HOMEBREW

azure-cli 2.30.0

Additional Context

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Nov 15, 2021
@yonzhan yonzhan added the Web Apps az webapp label Nov 15, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Nov 15, 2021
@yonzhan yonzhan added Service Attention This issue is responsible by Azure service team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 15, 2021
@ghost
Copy link

ghost commented Nov 15, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

Issue Details

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az webapp create-remote-connection

Errors:

The command failed with an unexpected error. Here is the traceback:
'Namespace' object has no attribute '_cmd'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 582, in execute
    parsed_args = self.parser.parse_args(args)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/knack/parser.py", line 260, in parse_args
    return super().parse_args(args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1822, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2064, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2004, in consume_optional
    take_action(action, args, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/arm.py", line 357, in __call__
    profile = Profile(cli_ctx=namespace._cmd.cli_ctx)  # pylint: disable=protected-access
AttributeError: 'Namespace' object has no attribute '_cmd'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az webapp create-remote-connection --resource-group {} --subscription {} --name {}

Expected Behavior

Environment Summary

macOS-11.5.2-x86_64-i386-64bit, Darwin 20.6.0
Python 3.9.8
Installer: HOMEBREW

azure-cli 2.30.0

Additional Context

Author: jasperdy
Assignees: -
Labels:

Web Apps, Service Attention, customer-reported

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 15, 2021

route to service team

@jiasli
Copy link
Member

jiasli commented Nov 15, 2021

This issue is caused by a regression in Python 3.9.8. Let's work on #20269.

@jiasli jiasli closed this as completed Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Web Apps az webapp
Projects
None yet
Development

No branches or pull requests

3 participants