question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az bicep upgrade failed

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az bicep upgrade

Errors:

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\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/custom.py", line 3672, in upgrade_bicep_cli
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 96, in ensure_bicep_installation
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 200, in _get_bicep_installed_version
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 238, in _run_command
  File "subprocess.py", line 501, in run
  File "subprocess.py", line 966, in __init__
  File "subprocess.py", line 1435, in _execute_child
OSError: [WinError 193] %1 is not a valid Win32 application

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 bicep upgrade

Expected Behavior

Environment Summary

Windows-10-10.0.22000-SP0
Python 3.10.4
Installer: MSI

azure-cli 2.37.0 *

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
spike28742commented, Oct 14, 2022

Hi,

I followed your recommendations and did not fix the issue.

Finally I managed to solve it by upgrading to the latest powershell version.

On Fri, Oct 14, 2022 at 3:41 AM RakeshMohan-MSFT @.***> wrote:

@spike28742 https://github.com/spike28742 The issue looks more like python configuration issue, please try to uninstall python and reinstall again. Also verify its path and any orphan path of previous installations as well.

Additionally please upgrade to latest version of az cli 2.41.0 https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

— Reply to this email directly, view it on GitHub https://github.com/Azure/azure-cli/issues/24191#issuecomment-1278363550, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZEYZ2OAEK332E5AN47LBDWDC22ZANCNFSM6AAAAAAREMUNEU . You are receiving this because you were mentioned.Message ID: @.***>

0reactions
RakeshMohanMSFTcommented, Oct 14, 2022

@spike28742 Glad you could solve the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`az bicep install` hitting error with ...
Bicep version none, failing to install the bicep CLI in general. Describe the bug Right now, az bicep install as well as az...
Read more >
Troubleshoot Bicep installation - Azure - Microsoft Learn
If you're using Azure CLI, run az bicep upgrade to update that version. To keep only one installation location, use the following steps:....
Read more >
Error while attempting to retrieve the latest Bicep version ...
I'm trying to deploy using bicep from a Powershell terminal in VSCode behind a corporate proxy. My command line is: az deployment sub...
Read more >
Troubleshooting - PSRule for Azure
This error is raised by a chained dependency failure importing a newer version of Az.Accounts . To avoid this issue attempt to install...
Read more >
Challenge 03: Deploy to Azure WebApp using GitHub Actions
Getting started; Create Azure Bicep template; Create resource group and deploy Bicep template; Create a simple express app ... Error: Az CLI Login...
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