Google cloud platform gsutil命令在Windows 10上每次都会崩溃
每当我运行某些gsutil命令时,例如Google cloud platform gsutil命令在Windows 10上每次都会崩溃,google-cloud-platform,gsutil,google-cloud-sdk,Google Cloud Platform,Gsutil,Google Cloud Sdk,每当我运行某些gsutil命令时,例如gsutil组件更新,它都会出现以下错误: 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
gsutil组件更新
,它都会出现以下错误:
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
运行建议的gloud info--diagnostics
也会失败,并出现相同的错误:
Network diagnostic detects and fixes local network connection issues.
Checking network connection...failed.
ERROR: gcloud crashed (LookupError): unknown encoding: cp65001
有人知道怎么解决这个问题吗
我尝试过设置pythonionecoding=UTF-8(),但没有帮助,我认为gsutil使用了自己的Python,它可能会忽略/重置这个变量
编辑:
我正在使用Powershell,它已将UTF-8设置为编码:
[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
在未选中“捆绑Python”的情况下重新安装CloudSDK对我来说成功了。我已经独立安装了Python 2.7。只需运行:
set PYTHONIOENCODING=UTF-8