Open gopisettyr opened 3 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.
Author: | gopisettyr |
---|---|
Assignees: | - |
Labels: | `ARM`, `Service Attention` |
Milestone: | - |
route to service team
Hi @gopisettyr, thanks for bringing this up.
When you check your PATH
variable ($Env:PATH
in PowerShell, for example) - do you see a path listed that contains a python executable (something like D:\Python38\
)?
Has their been any progress on this? I am receiving the same error when running any bicep commands on the Az CLI such as
az bicep version
az deployment group create
az bicep build
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 657, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 691, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 328, 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 3568, in show_bicep_cli_version
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 69, in run_bicep_command
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 181, 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 215, in _run_command
File "subprocess.py", line 493, in run
File "subprocess.py", line 858, in __init__
File "subprocess.py", line 1311, in _execute_child
OSError: [WinError 193] %1 is not a valid Win32 application
I have tried uninstalling & re-installing both Az CLI and bicep but still receive the same issue
Hi @gopisettyr, could you confirm if you are still getting this error? Did you try running the same command in the latest version of Azure CLI?
I'm having the same issue using the latest version
{ "azure-cli": "2.30.0", "azure-cli-core": "2.30.0", "azure-cli-telemetry": "1.0.6", "extensions": {} }
We get it when using az bicep publish --file
Bicep CLI version 0.4.1318 (ee0d808f35)
Update: After further investigation our problem was caused by az bicep is a per-user installation - so the error we got was basically a very bad way of saying bicep was not installed in that service accounts context, instead of saying "you are trying to run bicep but it's not installed"
Hi @gopisettyr, thanks for bringing this up.
When you check your
PATH
variable ($Env:PATH
in PowerShell, for example) - do you see a path listed that contains a python executable (something likeD:\Python38\
)?
Yes. I have Python 3.9.5 and 2.7.17 installed already and added to PATH, prior to installing BICEP. I can see there're Python related files under 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2', but not sure if I should add that to PATH because that would probably conflict with my other Python paths?
UPDATE:
NVM, issue is unrelated to existing Python installs. Just had to follow this instruction here: https://github.com/Azure/bicep/issues/2364#issuecomment-825049091
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az bicep upgrade
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az bicep upgrade
Expected Behavior
Environment Summary
Additional Context