LoginSignup
1
1

More than 3 years have passed since last update.

Windowsでgcloudコマンドを実行したら unknown encoding: cp65001 というエラーが出て使えない時の解決方法

Last updated at Posted at 2019-12-15

内容

gcloudコマンドを実行したらいきなりERROR: gcloud crashed (LookupError): unknown encoding: cp65001という内容のエラーが出た。

image.png

なにぃと思ってgcloud feedbackを実行しても同じエラーが出る。

実行環境

  • Windows 10 Insider Preview 19037.1 (vb_release)
  • Google Cloud SDK 273.0.0
  • PowerShell 5.1.19037.1

原因

これはPythonのエラーらしい

解決方法

PYTHONIOENCODINGという環境変数にUTF-8を設定することでエラーを解決できた。

PowerShellの場合

PowerShell
$env:PYTHONIOENCODING="UTF-8"

コマンドプロントの場合

コマンドプロンプト
set PYTHONIOENCODING="UTF-8"

参考にしたサイト

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1