Azure / Azure/azure-cli

Error upgrading azure cli using Homebrew

Open
#23,716 4 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad Auto-Assign Azure CLI Team customer-reported feature-request Upgrade
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.