az bicep upgrade
The command failed with an unexpected error. Here is the traceback:
[WinError 193] %1 is not a valid Win32 application
Traceback (most recent call last):
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesknack/cli.py", line 233, in invoke
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/core/commands/__init__.py", line 664, in execute
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/core/commands/__init__.py", line 701, in _run_job
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/core/commands/__init__.py", line 334, in __call__
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/core/commands/command_operation.py", line 121, in handler
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/command_modules/resource/custom.py", line 4655, in upgrade_bicep_cli
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/command_modules/resource/_bicep.py", line 119, in ensure_bicep_installation
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/command_modules/resource/_bicep.py", line 275, in _get_bicep_installed_version
File "D:a_work1sbuild_scriptswindowsartifactscliLibsite-packagesazure/cli/command_modules/resource/_bicep.py", line 327, in _run_command
File "subprocess.py", line 548, in run
File "subprocess.py", line 1026, in __init__
File "subprocess.py", line 1538, in _execute_child
OSError: [WinError 193] %1 is not a valid Win32 application
We are deploying the Azure Infra using bicep templates and azure cli commands from a long time. Never experienced this error but when I tried to do upgrade of bicep using the command az bicep upgrade
, I got this error.
what is the root cause of this error and how to resolve it?