めあとるーむ記録帳

なんか書く

GolangのAppEngineをデプロイしようとしたら失敗した。どうやらファイル名に日本語は使わない方がいいらしい

golang で AppEngine 開発してさあデプロイするぞ!とやったところエラーが出た。

PS > gcloud app deploy
Services to deploy:

(プロジェクト情報略)

Do you want to continue (Y/n)?  Y

Beginning deployment of service [news]...
Some files were skipped. Pass `--verbosity=info` to see which ones.
You may also view the gcloud log file, found at
(出力されるログファイルの場所情報略)
#============================================================#
#= Uploading 0 files to Google Cloud Storage                =#
#============================================================#
File upload done.
ERROR: gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0x82 in position 4: invalid start byte

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

今までできてて突然できなくなったので変更した場所が悪いのかな?と思うもエラー内容(UnicodeDecodeError)はPythonのエラーらしく、どうやらgcloudコマンド関係がクラッシュした模様(gcloudコマンドはPythonで実装されてる)

とはいえアップデートなどもなかったはずなのでやはりこちらが何か変更したのが悪いはずと思いいろいろと試したところ、どうやらプロジェクトファイル内のドキュメント関係を入れたディレクトリに日本語名のファイルがあることに気づく。

以前のデプロイでは存在していなかったファイルの名前を日本語から適当な英語のファイル名にしたところ無事デプロイ成功

どうやら関係ないファイルでも日本語名のファイルがあると問題が起こるらしい。確かに文字コード関係のエラーだもんね。

なお環境がWindowsなので要はこれShift-JISで名前が入ってるらしくその問題もあるのかもしれない。今後気を付けよう