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 : UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 598: ordinal not in range(128)

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug az vm create command throws above-mentioned exception if there is an error in deployment. We had error of “QuotaLimitExceeded” for our account. Instead of getting this error message in cli we are getting the exception. File "/usr/lib/python2.7/site-packages/msrestazure/azure_exceptions.py", line 104, in __str__ error_str += "\n\tMessage: {}".format(error_obj.message) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 598: ordinal not in range(128) Logged from file util.py, line 47

To Reproduce login into azure using cli try to create a VM on using account of which “quota” is exhausted.

Expected behavior An error message which we used to get before if quota is exceeded u'Operation could not be completed as it results in exceeding approved standardDSFamily Cores quota. Additional details - Deployment Model: Resource Manager, Location: centralus, Current Limit: 20, Current Usage: 20, Additional Required: 4, (Minimum) New Limit Required: 24. Submit a request for Quota increase at https://aka.ms/ProdportalCRP/?#create/Microsoft.Support/Parameters/%7B%22subId%22:%22d13a73b3-f1ce-4bb6-b9bc-0290730c310a%22,%22pesId%22:%2206bfd9d3-516b-d5c6-5802-169c800dec89%22,%22supportTopicId%22:%22e12e3d1d-7fa0-af33-c6d0-3c50df9658a3%22%7D by specifying parameters listed in the \u2018Details\u2019 section for deployment to succeed. Please read more about quota limits at https://docs.microsoft.com/en-us/azure/azure-supportability/per-vm-quota-requests

Environment summary Install method - pip Docker image: Alpine based

Additional context I tried this with pip3 and python3 , got following error: File "/usr/lib/python3.7/site-packages/msrestazure/azure_exceptions.py", line 120, in __str__ return error_bytes.decode('ascii') UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 912: ordinal not in range(128)

StackOverflow: https://stackoverflow.com/questions/60214478/azure-cli-unicodeencodeerror-ascii-codec-cant-encode-character-u-u2018-i?noredirect=1#comment106518480_60214478

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
yungezzcommented, Feb 14, 2020

thanks for reporting the issue. we’re looking at it.

0reactions
qwordycommented, Apr 21, 2020

Azure CLI 2.4.0 has been released. It fixes this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure CLI : UnicodeEncodeError: 'ascii' codec can't encode ...
Azure CLI : UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 598: ordinal not in range(128).
Read more >
CLIInternalError: 'ascii' codec can't encode character '\u2716 ...
I have a AZ CLI task that executes an AZ ACR BUILD. At the end of the ACR build I get this error...
Read more >
How to install the Azure CLI - Microsoft Learn
To install the Azure CLI on Windows, you must use Powershell, or an MSI installer, which gives you access to the CLI through...
Read more >
'ascii' codec can't encode character u'\u03b1' in position 20 ...
I'm trying to write a to a csv file, I get the following error: UnicodeEncodeError: 'ascii' codec .
Read more >
Workaround for error 'utf-8' codec can't decode byte 0x82 ...
We wanted to write non-compliant messages in French in our Azure Policy. Here is an example that contains the French character é and...
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