gsutil命令每次都在Windows 10上崩溃

问题描述 投票:0回答:1

每当我运行一些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
1个回答
1
投票

使用“Bundled Python”重新安装Cloud SDK未经检查对我来说是个窍门。我独立安装了Python 2.7。

© www.soinside.com 2019 - 2024. All rights reserved.