Az Cli Message Auto upgrade failed. 'pypi' display despite running latest version

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug Every Az CLI command I run generates this message at the end despite successfully running the command. “Auto upgrade failed. ‘pypi’”

To Reproduce run “az --version” or any az cli command at command line.

Expected behavior Displays this WITHOUT “Auto upgrade failed. ‘pypi’”

az --version

azure-cli 2.30.0

core 2.30.0 telemetry 1.0.6

Extensions: azure-devops 0.22.0

Python location ‘C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe’ Extensions directory ‘C:\Users\schwinbp.azure\cliextensions’

Python (Windows) 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 13:22:56) [MSC v.1928 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Unable to check if your CLI is up-to-date. Check your internet connection.

Please let us know how we are doing: https://aka.ms/azureclihats and let us know if you’re interested in trying out our newest features: https://aka.ms/CLIUXstudy Auto upgrade failed. ‘pypi’

Environment summary Windows 10 MSI and CMD.exe CLI for Azure DevOps extension.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jiaslicommented, Nov 26, 2021

auto-upgrade is currently not maintained very actively. Please refrain from using auto-upgrade which is by default turned off.

0reactions
kbrimblecommented, Nov 25, 2021

I still have this issue:

➜ az --version --debug
cli.knack.cli: Command arguments: ['--version', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
urllib3.connectionpool: Starting new HTTPS connection (1): azure.microsoft.com:443
urllib3.connectionpool: https://azure.microsoft.com:443 "HEAD / HTTP/1.1" 301 0
cli.azure.cli.core.util: Connectivity check: 0.2612989000000141 sec
urllib3.connectionpool: Starting new HTTPS connection (1): raw.githubusercontent.com:443
urllib3.connectionpool: https://raw.githubusercontent.com:443 "GET /Azure/azure-cli/main/src/azure-cli-core/setup.py HTTP/1.1" 200 1265
urllib3.connectionpool: Starting new HTTPS connection (1): raw.githubusercontent.com:443
urllib3.connectionpool: https://raw.githubusercontent.com:443 "GET /Azure/azure-cli/main/src/azure-cli-telemetry/setup.py HTTP/1.1" 200 676
azure-cli                         2.30.0

core                              2.30.0
telemetry                          1.0.6

Python location '/opt/az/bin/python3'
Extensions directory '/home/kristianb/.azure/cliextensions'

Python (Linux) 3.6.10 (default, Oct 29 2021, 10:11:34)
[GCC 9.3.0]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f2b73c49378>]
cli.__main__: Command ran in 0.612 seconds (init: 0.084, invoke: 0.528)
cli.__main__: Auto upgrade failed. 'pypi'
cli.azure.cli.core.decorators: Suppress exception:
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/__main__.py", line 60, in <module>
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/__main__.py", line 53, in <module>
    sys.exit(exit_code)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/decorators.py", line 76, in _wrapped_func
    return func(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/telemetry.py", line 306, in set_custom_properties
    actual_value = value() if hasattr(value, '__call__') else value
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/telemetry.py", line 171, in <lambda>
    'x-ms-client-request-id'])
KeyError: 'x-ms-client-request-id'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure: Auto upgrade failed. 'pypi' - Stack Overflow
From this conversation on a GitHub issue it seems that auto-upgrade isn't actively maintained. enter image description here.
Read more >
Release notes & updates – Azure CLI - Microsoft Learn
Learn about the latest Azure Command-Line Interface (CLI) release notes and updates for both the current and beta versions of the CLI.
Read more >
azure-cli-core 2.10.0 - PyPI
Fix core tests failed under certain profiles (#13136) ... az –version : Show command instruction and detailed instruction link when updates available ...
Read more >
azure-cli-core 2.0.75 - PyPI
output: Fix bug where commands fail if –output yaml is used with –query ... az –version now displays a notification if you have...
Read more >
azure-cli 2.23.0 - PyPI
[BREAKING CHANGE] Update websites SDK to the latest version ... az ssh vm : Automatically launch browser when getting certificate fails (#17093).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found