{Profile} az login: Polish UnicodeDecodeError#12972
Merged
Conversation
Collaborator
|
add to S168 |
arrownj
reviewed
Apr 15, 2020
| except socket.error as ex: | ||
| logger.warning("Port '%s' is taken with error '%s'. Trying with the next one", port, ex) | ||
| except UnicodeDecodeError: | ||
| logger.warning("Please make sure there is no international (Unicode) character in the computer name " |
Contributor
There was a problem hiding this comment.
Just curious about that if we actually have international character in the compute name, the only way to get it passed is to rename the compute name ?
Member
Author
There was a problem hiding this comment.
The link does have instructions about how to bypass it: #12957
But using Unicode as a computer name is always a bad idea.
arrownj
approved these changes
Apr 20, 2020
qianwens
reviewed
Apr 20, 2020
| break | ||
| except socket.error as ex: | ||
| logger.warning("Port '%s' is taken with error '%s'. Trying with the next one", port, ex) | ||
| except UnicodeDecodeError: |
Member
There was a problem hiding this comment.
except UnicodeDecodeError: [](start = 8, length = 26)
make sure we handle this exception in MSAL too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix #12957, #7989
If the computer name or
C:\Windows\System32\drivers\etc\hosts127.0.0.1entries contain international characters (Unicode), Azure CLI fails with a nasty error:This PR refines the error message to:
Testing Guide
Change computer name to a Unicode string like
测试or add127.0.0.1 测试toC:\Windows\System32\drivers\etc\hosts. Runaz login.