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.

Az login not working: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 0: invalid start byte

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:
'utf-8' codec can't decode byte 0xa0 in position 0: invalid start byte
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 139, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 154, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 153, in login_with_auth_code
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 1779, in acquire_token_interactive
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 281, in obtain_token_by_browser
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 629, in obtain_token_by_browser
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/authcode.py", line 165, in __init__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/authcode.py", line 116, in __init__
  File "socketserver.py", line 452, in __init__
  File "http\server.py", line 138, in server_bind
  File "socket.py", line 793, in getfqdn
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 0: invalid start byte

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.22000-SP0
Python 3.10.5
Installer: MSI

azure-cli 2.41.0

Extensions:
logic 0.1.5

Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tbshrrcommented, Oct 21, 2022

@navba-MSFT I didn’t try the above but i somehow logged in using az login --use-device-code option and it had worked

0reactions
navba-MSFTcommented, Oct 21, 2022

@tbshrr Thanks for getting back. We will now proceed with closure of this GitHub issue. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az login fails: UnicodeDecodeError: 'utf-8' codec can't decode ...
az login fails: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 10: invalid start byte #12957.
Read more >
Running az cli commands in Cloud shell fails with ...
Running az cli commands in Cloud shell fails with UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8e in position 0: invalid start byte.
Read more >
Python UnicodeDecodeError utf-8 codec can t decode byte ...
utf-8 ' codec can't decode byte 0xa0 in position 10: invalid start byte. my code import wordcloud import numpy as np from matplotlib...
Read more >
Workaround for error 'utf-8' codec can't decode byte 0x82 ...
We ran into an issue deploying a bicep file containing French characters using Azure CLI. The message was: 'utf-8' codec can't decode byte...
Read more >
UnicodeDecodeError: "utf-8" codec can"t decode byte 0xa0 in ...
Unable to import this file it shows an error. My code was: import pandas as pd a = pd.read_csv("filename.csv")
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