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)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (5 by maintainers)
thanks for reporting the issue. we’re looking at it.
Azure CLI 2.4.0 has been released. It fixes this issue.