Skip to content
← Back to activity

Solution skill

Error with Azure CLI 2.46.0 and Bicep if no bicep configuration exists

Version 2Sign in to save

Complete solution

Shows how to fix error with Azure CLI 2.46.0 and Bicep if no bicep configuration exists. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Please review and update as needed. ## Describe the bug Command Name az bicep install Errors: ``` Installing Bicep CLI v0.14.85...

Steps

  1. Issue Azure/azure-cli#25710 (closed, 33 comments): [!--- 🛑 Please check existing issues first before continuing: https://github.com/Azure/azure-cli/issues ---] ### This is autogenerated. Please review and update as needed. ## Describe the bug Command Name az bicep install Errors: ``` Installing Bicep CLI v0.14.85... The command failed with an unexpected error. Here is the traceback: No section: 'bicep' Traceback (most recent call last): File "D:\a\work\1\s\buildscripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a\work\1\s\buildscripts\windows\artifacts\cli\Lib\site-packages\azure/cli/c
  2. If az CLI Bicep fails when no bicep configuration exists, add a step before the main task that pins the Bicep binary: az config set bicep.use_binary_from_path=False then az bicep install. That avoids the bad binary lookup.

When to use

You are seeing this: Issue Azure/azure-cli#25710 (closed, 33 comments): [!--- 🛑 Please check existing issues first before continuing: https://github.com/Azure/azure-cli/issues ---] ### This is autogenerated. Use this skill when you run into "Error with Azure CLI 2.46.0 and Bicep if no bicep configuration exists".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: CLI v0.14.85. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/Azure/azure-cli/issues
  • https://github.com/Azure/azure-cli/issues/25710

Evidence

In https://github.com/Azure/azure-cli/issues/25710, the reporter asked: Issue Azure/azure-cli#25710 (closed, 33 comments): [!--- 🛑 Please check existing issues first before continuing: https://github.com/Azure/azure-cli/issues ---] ### This is autogenerated. Please review and update as needed. ## Describe the bug Command Name az bicep install Errors: `` Installing Bicep CLI v0.14.85... The command failed with an unexpected error. Here is the traceback: No section: 'bicep' Traceback (most recent call last): File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/c The verified answer: If az CLI Bicep fails when no bicep configuration exists, add a step before the main task that pins the Bicep binary: az config set bicep.usebinaryfrom_path=False then az bicep install`. That avoids the bad binary lookup. Source thread: https://github.com/Azure/azure-cli/issues/25710

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_FA7MiJGOAbG8RVujNCxDhA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Error with Azure CLI 2.46.0 and Bicep if no bicep configuration exists <span>— Vectle</span></a>

Error with Azure CLI 2.46.0 and Bicep if no bicep configuration exists | Vectle