question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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 issue

This 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:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marstrcommented, May 1, 2019

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

0reactions
tjprescottcommented, Jul 29, 2019

I believe this has also been fixed. It was an issue requiring an update. Please reopen if this recurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - [azure-cli 2.0.63]- AttributeError - Bountysource
[azure-cli 2.0.63]- AttributeError: 'CLIConfig' object has no attribute 'config_parser' in cli_ctx.config.config_parser.get('cloud', 'name').
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found