Skip to content

Error upgrading azure cli using Homebrew #23716

@elaamrani

Description

@elaamrani

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az upgrade

Errors:

Auto upgrade failed. name 'exit_code' is not defined
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/util/custom.py", line 154, in upgrade_version
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 168, in reload
ModuleNotFoundError: spec not found for the module 'subprocess'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
  File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/__main__.py", line 48, in <module>
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/__main__.py", line 35, in cli_main
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 243, in invoke
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 135, in exception_handler
  File "/opt/homebrew/Cellar/azure-cli/2.38.0/libexec/lib/python3.10/site-packages/azure/cli/core/util.py", line 57, in handle_exception
ModuleNotFoundError: No module named 'jmespath'

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 upgrade

Expected Behavior

Environment Summary

macOS-12.2.1-arm64-arm-64bit, Darwin 21.3.0
Python 3.10.6
Installer: HOMEBREW

azure-cli 2.39.0

Extensions:
aks-preview 0.5.51
account 0.2.3

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions