Fixing the TypeError: ‘NoneType’ error message while running the az acr build command

A short post this time to give you  a tip to solve an ongoing bug with Azure CLI v 2.26.0 in CloudShell.

Background

This bug is present while running the command az acr build on Cloud Shell, you will obtain the following error message:

This is caused by a bug in Azure CLI v2.26.0 and fixed in CLI v2.26.1

Solution

So, a workaround that I found is to downgrade Azure CLI to V2.25.0 on Cloud Shell, how to do that?, let me show you:

Within the Cloud Shell session, run the following commands:

python -m pip install -U –force-reinstall pip
pip install azure-cli==2.25.0 –force-reinstall azure-cli

After that restart Cloud Shell and re run az acr build, it should work this time!

I hope this helps

Related Post

Leave a Reply

Your email address will not be published.