Google Cloud App SDK崩溃了吗?云崩溃(LookupError):编码cp65001未知

Kon*_*nev 7 google-cloud-platform gcloud

我从https://cloud.google.com/sdk/docs/ 获得了App Engine,
安装后,我无法运行,gsutil init或者 无法gcloud info --run-diagnostics在Google Clood SDK Shell或Windows Powershell中运行,但此错误以此结尾:

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
Run Code Online (Sandbox Code Playgroud)

我将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
Run Code Online (Sandbox Code Playgroud)

我已经尝试了所有这些答案,但这没有帮助吗?gsutil命令每次在Windows 10上崩溃LookupError:未知编码:cp0Python 2.7:LookupError:未知编码:cp65001

我尝试安装Python 3.7、2.7.9和“捆绑的Python”。

mis*_*ope 12

我在Windows 10上遇到了完全相同的问题,并记得在安装Google Cloud之前,我已启用Unicode UTF-8以获得全球支持,并且禁用该beta功能解决了该问题。

禁用它:

  • 打开区域和语言设置(按WinKey并输入:region
  • 在“ 相关设置”部分中,单击“ 管理语言设置”
  • 在“ 管理”选项卡上,单击“ 更改系统区域设置...”。
  • 确保取消选中Beta:使用Unicode UTF-8获得全球语言支持

尝试重新安装Google Cloud SDK,然后在命令行中gcloud init再次执行后应该可以正常工作。


Jee*_*Mok 11

您可以尝试运行:

set PYTHONIOENCODING=UTF-8
Run Code Online (Sandbox Code Playgroud)

或者,创建一个名称为“ PYTHONIOENCODING”且值为“ UTF-8”的环境变量。

它为我解决了问题。

  • 是! 为我解决!我认为这与此有关:https://bugs.python.org/issue1602 (2认同)