I get App Engine from https://cloud.google.com/sdk/docs/
After install, I cant run gsutil init
or gcloud info --run-diagnostics
in Google Clood SDK Shell or Windows Powershell, it ends with this error:
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.
ERROR: gcloud crashed (LookupError): unknown encoding: cp65001
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 had UTF-8 set as the encoding:
[Console]::OutputEncoding
BodyName : utf-8
EncodingName : Unicode (UTF-8)
HeaderName : utf-8
WebName : utf-8
WindowsCodePage : 1200
IsBrowserDisplay : True
IsBrowserSave : True
IsMailNewsDisplay : True
IsMailNewsSave : True
IsSingleByte : False
EncoderFallback : System.Text.EncoderReplacementFallback
DecoderFallback : System.Text.DecoderReplacementFallback
IsReadOnly : True
CodePage : 65001
I've tried all this answers, but it didn't help → gsutil command crashes every time on Windows 10, LookupError: unknown encoding: cp0, Python 2.7 : LookupError: unknown encoding: cp65001
I've tried install Python 3.7, 2.7.9 and "Bundled Python".
Show activity on this post. The error means that Unicode characters that your script are trying to print can't be represented using the current console character encoding.
You can try running:
set PYTHONIOENCODING=UTF-8
Or, create an environment variable with the name 'PYTHONIOENCODING' and value 'UTF-8'.
It solves the problem for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With