[azure-cli 2.0.63]- AttributeError: 'CLIConfig' object has no attribute 'config_parser' in cli_ctx.config.config_parser.get('cloud', 'name')
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
executing az comands fails with the following error post upgrading to 2.0.63 line 241, in get_active_cloud_name return cli_ctx.config.config_parser.get(‘cloud’, ‘name’) AttributeError: ‘CLIConfig’ object has no attribute ‘config_parser’
Command Name
az login
Errors: AZ Login Code in Notebook
print(f'START: !az login\n')
!az login
if _exit_code != 0:
raise SystemExit('Shell command:\n\n\t !az login\n\nreturned non-zero exit code: ' + str(_exit_code) + '.\n')
print(f'\nSUCCESS: !az login')
Output START: !az login
Traceback (most recent call last): File “C:\Users\pradm\azuredatastudio-python\0.0.1\lib\runpy.py”, line 193, in run_module_as_main “main”, mod_spec) File “C:\Users\pradm\azuredatastudio-python\0.0.1\lib\runpy.py”, line 85, in run_code exec(code, run_globals) File "C:\Users\pradm\azuredatastudio-python\0.0.1\lib\site-packages\azure\cli_main.py", line 33, in <module> az_cli = get_default_cli() File "C:\Users\pradm\azuredatastudio-python\0.0.1\lib\site-packages\azure\cli\core_init.py", line 522, in get_default_cli help_cls=AzCliHelp) File “C:\Users\pradm\azuredatastudio-python\0.0.1\lib\site-packages\azure\cli\core_init_.py”, line 55, in init self.cloud = get_active_cloud(self) File “C:\Users\pradm\azuredatastudio-python\0.0.1\lib\site-packages\azure\cli\core\cloud.py”, line 310, in get_active_cloud return get_cloud(cli_ctx, get_active_cloud_name(cli_ctx)) File “C:\Users\pradm\azuredatastudio-python\0.0.1\lib\site-packages\azure\cli\core\cloud.py”, line 241, in get_active_cloud_name return cli_ctx.config.config_parser.get(‘cloud’, ‘name’) AttributeError: ‘CLIConfig’ object has no attribute ‘config_parser’ An exception has occurred, use %tb to see the full traceback.
SystemExit: Shell command:
!az login
returned non-zero exit code: 1.
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 login
Expected Behavior
Environment Summary
Windows-10-10.0.14393-SP0
Python 3.7.1
Shell: cmd.exe
azure-cli 2.0.63
Additional Context
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Looking at this briefly, I’m fairly confident that the this is coming down to an incomplete install when upgrading via pip. Now that it’s worked successfully after a reinstall, I would imagine that it will continue to work.
@adewaleo is correct that we discourage people from installing directly from pip as we have less control over the dependencies that will be used. But, for now we’re ‘best-effort’ supporting people installing this way. I’ll round-back to this issue and see if there’s a more complete answer I can help you with.
edit: Completing my thought
I believe this has also been fixed. It was an issue requiring an update. Please reopen if this recurs.