ModuleNotFoundError: No module named 'urllib3.util.ssl_match_hostname' #27661
Labels
Azure CLI Team
The command of the issue is owned by Azure CLI team
Core
CLI core infrastructure
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Describe the bug
When running any
az
command i get the following error message.ModuleNotFoundError: No module named 'urllib3.util.ssl_match_hostname'
Related command
az --version
Errors
ModuleNotFoundError: No module named 'urllib3.util.ssl_match_hostname'
Issue script & Debug output
PS C:\Apps> az --version --debug
No module named 'urllib3.util.ssl_match_hostname'
cli.knack.cli: Command arguments: ['--version', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x042AB538>]
cli.main: Command ran in 0.337 seconds (init: 0.322, invoke: 0.014)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3213 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\MartijnS.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 225, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 121, in show_version
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/util.py", line 372, in get_az_version_string
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/util.py", line 316, in _update_latest_from_github
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/util.py", line 854, in check_connectivity
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/init.py", line 43, in File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/init.py", line 13, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py", line 12, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connection.py", line 63, in
ModuleNotFoundError: No module named 'urllib3.util.ssl_match_hostname'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "runpy.py", line 196, in _run_module_as_main
File "runpy.py", line 86, in _run_code
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/main.py", line 50, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/main.py", line 36, in cli_main
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 245, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 127, in exception_handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/util.py", line 59, in handle_exception
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrestazure/init.py", line 28, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrestazure/azure_configuration.py", line 34, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/init.py", line 28, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/configuration.py", line 37, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/pipeline/init.py", line 52, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/init.py", line 43, in File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/init.py", line 13, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py", line 12, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connection.py", line 63, in
ModuleNotFoundError: No module named 'urllib3.util.ssl_match_hostname'
Expected behavior
It should print out the version information without an error.
Environment Summary
az --version also gives the error but u did uninstall and reinstall the latest version
azure-cli-2.53.0-x64.msi
Additional context
No response
The text was updated successfully, but these errors were encountered: