az feedbackauto-generates most of the information requested below, as of CLI version brew info azure-cliazure-cli: stable 2.0.80 (bottled), HEAD
Microsoft Azure CLI 2.0
https://docs.microsoft.com/cli/azure/overview
/usr/local/Cellar/azure-cli/2.0.79_2 (15,697 files, 146.1MB) *
Poured from bottle on 2020-01-14 at 11:11:16
/usr/local/Cellar/azure-cli/2.0.79_2_old (15,482 files, 143.9MB)
Poured from bottle on 2020-01-14 at 11:30:27
Describe the bug
when launching the az command there is the following error
Fatal Python error: config_get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
Python runtime state: preinitialized
the error comes from python 3.8 itself cause I have the same error when doing /usr/local/Cellar/azure-cli/2.0.79_2/libexec/bin/python3.8
To Reproduce
brew upgrade azure-cli
Expected behavior
no error on the command
Environment summary
Install Method
brew on catalina 10.15.2
@fengzhou-msft, please help take a look, thanks.
This issue seems to be related with the installation or configuration for python. Can you remove python and azure-cli, then reinstall azure-cli?
thannk for your time, I did that with no luck, and indeed it seems that there is some python issue on my machine, I suspect even something is some native library.
But I don't really know how to solve this.
Is there a way to have az installed in a independent manner without any dependencies ?
I have found the issue, my shell locale was not set up properly.
I had a language set to LANG=en_US instead of LANG=en_US.UTF-8
Thanks for you time, I'll close this issue.
Most helpful comment
I have found the issue, my shell locale was not set up properly.
I had a language set to
LANG=en_USinstead ofLANG=en_US.UTF-8Thanks for you time, I'll close this issue.