gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode character u'\xe7' in position 13: ordinal not in range(128)

install gcloud
google cloud sk
gcloud cli on windows
install gcloud compute
google cloud sdk documentation
install gcloud cli
gcloud permission denied windows
windows 10 gcloud

Welcome to the Google Cloud SDK! Run "gcloud -h" to get the list of

available commands.

C:\Program Files (x86)\Google\Cloud SDK>gcloud init Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag: gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues. Checking network connection...done. Reachability Check passed. Network diagnostic (1/1 checks) passed.

ERROR: gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode character u'\xe7' in position 13: ordinal not in range(128)

If you would like to report this issue, please run the following command: gcloud feedback

To check gcloud for common problems, please run the following command: gcloud info --run-diagnostics

I don't know what to do... I just want to use the sdk but I can't init it...

Have a look at the file which gave error , edit the .py file to add following lines

import sys
reload(sys)
sys.setdefaultencoding('utf8')

Bitbucket Pipelines: gcloud crashed (UnicodeDecodeError), Building and pushing image for service [default] ERROR: gcloud crashed (​UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 in  gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0xf8 in position 29: invalid start byte I have no clue whats happening with it. Works fine in my local server.

Try edit the code in google-cloud-sdk/lib/third_party/socks/__init__.py(google-cloud-sdk is the archive you downloaded to install google cloud sdk) in line 262:

req = req + struct.pack(">H", destport)

to

if isinstance(req, unicode):
    req = req.encode('UTF-8')
req = req + struct.pack(">H", destport)

reference: https://c11e.wodemo.com/gcloud-crashed-unicodedecodeerror

App engine deploymemt failure · Issue #296 · GoogleCloudPlatform , [INFO] GCLOUD: ERROR: gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode characters in position 22-23: ordinal not in  ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte 0xbb in position 3: ordinal not in range(128) If you would like to report this issue, please run the following command: gcloud feedback To check gcloud for common problems, please run the following command: gcloud info --run-diagnostics $ Please advise.

I kept getting this similar error every time I ran a gcloud command after a crash:

ERROR: gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0xa4 in position 1: invalid start byte

The solution was to delete this file:

~/.config/gcloud/gce

Don't ask me why that works or what that files does, I don't know (if you do, please let me know), but it gets recreated on the next command run and it fixed my issue.

gcloud crashed: 'ascii' codec can't encode character u'\xae' · Issue , Issue running command [gcloud deployment]. What steps will reproduce the problem? gcloud deployment-manager manifests describe  gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode character u'\xe7' in position 13: ordinal not in range(128) 2 “gcloud auth activate-service-account” and “gcloud source repos clone” error

For me the fix was removing an accent ('é') from a folder in the path of my project. Hope it can help someone since I didn't find this solution after googling it for hours.

Build pipeline & gcloud is erroring out, ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte The GCloud issue is due to there being a Unicode character located in either I was having a similar problem but with unicode encode error. What steps will reproduce the problem? gcloud deployment-manager manifests describe manifest-1459881356495 --deployment stm-dev-new-1 Project ID: huyhuynh-test-1226 (#1053378765944) What is the expected output? What do you see instead? gcloud crashed failing to decode some ASCII Please provide any additional information below.

As you’ve noticed that the error is due to a non-ASCII character in the username. As a workaround, you can set the CLOUDSDK_CONFIG environment variable to a path that contains only ASCII characters.

Error: 'ascii' codec can't decode byte 0xe2 in position 25: ordinal not , ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 /Users/b_d_m_p/google-cloud-sdk/calliope/cli.py:870 UnicodeEncodeError: 'ascii' codec can't encode character '\xd6' in position 36: ordinal not in range(128) #4060

ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't , ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte 0xbb in position 3: ordinal not in range(128) If you would like  Building and pushing image for service [default] ERROR: gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode characters in position 1267-1299: ordinal not in range(128) If you would like to report this issue, please run the following command: gcloud feedback

Google Cloud Build how to properly solve issues, ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 in position 13: ordinal not in range(128). The error  [INFO] GCLOUD: ERROR: gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode characters in position 22-23: ordinal not in range(128) [INFO] GCLOUD: [INFO] GCLOUD: If you would like to report this issue, please run the following command: [INFO] GCLOUD: gcloud feedback [INFO] GCLOUD:

GoogleCloudFunctionsのデプロイでハマった('ascii' codec can't , ERROR: gcloud crashed (UnicodeEncodeError): 'ascii' codec can't Exception in thread Thread-1: Traceback (most recent call last): File 

Comments
  • Can you look in your logs to see what might have gone wrong? The location of the logs directory can be found by running gcloud info. Running gcloud init is a good way to get your Cloud SDK set up for use. However it is not required, you can use the Cloud SDK without it. You will just have to set up your account using gcloud auth login and your project using gcloud config set project NAME_OF_YOUR_PROJECT.
  • Thank you for your answer, there is the log : 1drv.ms/u/s!Al4u8hoba_q0m4d3Wx0SHWemeCjWEQ I guess the error is due to the 'ç' in my firstname ... but how to make it works then ?
  • This is the correct solution. I also had a special character in my project name. Thank you
  • that's right, I've set CLOUDSDK_CONFIG to C:\config and initialized gcloud