Я использую azure cli в альпийском docker контейнере. Я установил azure -cli, используя pip2 на alpine.
При использовании azure -cli в команде "vm create" я получаю сообщение об ошибке выше.
az login #worked fine but
az vm create -n ${VM_NAME} -g ${AZURE_RESOURCE_GROUP} --image ${VHD_URL} --os-type linux --
use-unmanaged-disk -l "Central US" --authentication-type password --admin-username ${USER} --
admin-password "${PASSWORD}" --storage-account ${AZURE_STORAGE_ACCOUNT} --storage-
container-name ${AZURE_CONTAINER} --size Standard_DS3
53 Traceback (most recent call last):
54 File "/usr/lib/python2.7/logging/__init__.py", line 868, in emit
55 msg = self.format(record)
56 File "/usr/lib/python2.7/logging/__init__.py", line 741, in format
57 return fmt.format(record)
58 File "/usr/lib/python2.7/logging/__init__.py", line 469, in format
59 s = self._fmt % record.__dict__
60 File "/usr/lib/python2.7/site-packages/msrestazure/azure_exceptions.py", line 193, in
__str__
61 return str(self.error)
62 File "/usr/lib/python2.7/site-packages/msrestazure/azure_exceptions.py", line 104, in
__str__
63 error_str += "\n\tMessage: {}".format(error_obj.message)
64 UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 598:
ordinal not in range(128)
65 Logged from file util.py, line 47
66 Traceback (most recent call last):
67 File "/usr/lib/python2.7/logging/__init__.py", line 868, in emit
68 msg = self.format(record)
69 File "/usr/lib/python2.7/site-packages/knack/log.py", line 78, in format
70 msg = logging.StreamHandler.format(self, record)
71 File "/usr/lib/python2.7/logging/__init__.py", line 741, in format
72 return fmt.format(record)
73 File "/usr/lib/python2.7/logging/__init__.py", line 469, in format
74 s = self._fmt % record.__dict__
75 File "/usr/lib/python2.7/site-packages/msrestazure/azure_exceptions.py", line 193, in
__str__
76 return str(self.error)
77 File "/usr/lib/python2.7/site-packages/msrestazure/azure_exceptions.py", line 104, in
__str__
78 error_str += "\n\tMessage: {}".format(error_obj.message)
79 UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 598:
ordinal not in range(128)
80 Logged from file util.py, line 47
I знаю, что это python проблема, я даже пытался установить azure cli с pip3, но это вывело другую ошибку "строка не имеет атрибута .message"