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.

The command failed with an unexpected error. Here is the traceback: '3'

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az login

Errors:

The command failed with an unexpected error. Here is the traceback:
'3'
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 236, in invoke
    formatter = self.output.get_formatter(output_type)
  File "/opt/az/lib/python3.6/site-packages/knack/output.py", line 166, in get_formatter
    return OutputProducer._FORMAT_DICT[format_type]
KeyError: '3'

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 --use-device-code

Expected Behavior

Environment Summary

Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid, Ubuntu 20.04.2 LTS
Python 3.6.10
Installer: DEB

azure-cli 2.32.0

Extensions:
account 0.2.1
alias 0.5.2
resource-graph 2.1.0

Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0

Additional Context

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jiaslicommented, Jan 6, 2022

This is because you have config core.output set as 3 which is invalid. Please unset this invalid config:

az config unset core.output

See https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration

0reactions
suresh8771commented, Aug 19, 2022

@jiasli thanks it solved my issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az cli on Windows cannot run any commands - Microsoft Q&A
The command failed with an unexpected error. Here is the traceback: Expected 1 module to load starting with 'azext_': got []
Read more >
I am unable to login into azure using my system powershell
The command failed with an unexpected error. Here is the traceback: 0. The ID token is not yet valid. Current epoch = 1647701015....
Read more >
Azure Support on Twitter: "@Joachim8675309 We are ...
Describe the bug Command Name az aks get-credentials Errors: The command failed with an unexpected error. Here is the traceback: cannot im.
Read more >
Azure CLI Task - az webapp create Fails on Linux Hosted Agent
ERROR: The command failed with an unexpected error. Here is the traceback: 2021-05-14T13:08:35.9397077Z ERROR: Unable to build a model: Unable to ...
Read more >
azure-cli: az webapp commands failing: API version 2022-03 ...
az webapp commands are failing with the following stack trace: $ az webapp list. The command failed with an unexpected error. Here is...
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