Whenever I run some gsutil command, for example gsutil components update
, it exits with this error:
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
Running gloud info --diagnostics
as it suggests also fails with the same error:
Network diagnostic detects and fixes local network connection issues.
Checking network connection...failed.
ERROR: gcloud crashed (LookupError): unknown encoding: cp65001
Does anybody know how to fix this?
I've tried setting PYTHONIOENCODING=UTF-8 (Python 2.7 : LookupError: unknown encoding: cp65001) but it didn't help, I think gsutil uses its own Python and it might be ignoring/resetting this variable.
Edit:
I'm using Powershell, it already has 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