Search code examples
azureazure-cliazure-cloud-shell

Running az cli commands in Cloud shell fails with UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8e in position 0: invalid start byte


I am trying to run az cli command say for exmaple az --version or az account show

I am getting below error : File "/opt/az/lib/python3.6/encodings/utf_8_sig.py", line 117, in decode return codecs.utf_8_decode(input, errors) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8e in position 0: invalid start byte

It was working till date without any issue. if I run python --version , it gives me 3.5.2. So looks like i have python 3.5.2 but the error above coming from python 3.6 files.

enter image description here


Solution

  • Try to open a new cloud shell, it should work.

    My python version is also 3.5.2.

    enter image description here

    enter image description here

    Update:

    Please try to unmount the old storage file share and mount a new one.

    Run clouddrive unmount in the cloud shell, you will be prompted to unmount the file share, then login again, it will prompt you to mount a new one, finish it and try again.

    enter image description here