【发布时间】:2018-12-15 17:04:52
【问题描述】:
每当我运行一些 gsutil 命令时,例如 gsutil components update,它都会退出并出现以下错误:
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
有人知道如何解决这个问题吗?
我尝试设置 PYTHONIOENCODING=UTF-8 (Python 2.7 : LookupError: unknown encoding: cp65001) 但没有帮助,我认为 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
【问题讨论】:
标签: google-cloud-platform gsutil google-cloud-sdk