Azure / Azure/azure-cli

Version 2.77 introduced a python error on upgrade, using az upgrade or MSI

Open
#32,221 2 comments 0 reactions 2 assignees Claimed by @bebound View on GitHub
act-platform-engineering-squad Auto-Assign Azure CLI Team customer-reported Possible-Solution question Similar-Issue Upgrade
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Specifically for upgrading to version 2.77 using: either
1) az upgrade or
2) azure cli 2.77 MSI file.
the upgrade will not fail, but running any az command will throw error

I know a fresh install will fix it, but this has been going on for over a month and a new version with a fix has not come out.´
The amount of hours spend around the world on this issue is ridiculous. Many computers will auto update to the latest version.

### Related command

az upgrade

### Errors

> Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/__main__.py", line 13, in File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/telemetry.py", line 19, in File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/telemetry/__init__.py", line 9, in File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\portalocker/__init__.py", line 4, in File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\portalocker/portalocker.py", line 11, in ImportError: DLL load failed while importing win32file: The specified module could not be found.

### Issue script & Debug output

NA

### Expected behavior

Upgrade to newest version. az commands can be run.

### Environment Summary

NA, cannot run this command when having upgraded to

### Additional context

_No response_

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.