Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

GAE/pyのデプロイ

More than 3 years have passed since last update.
app.yaml
#deployで必須な二項目
application: chaos-1470381605974
version: 1

runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /(.*\.(ico|js|ttf|css|gif|png))
  static_files: \1
  upload: (.*\.(ico|js|ttf|css|gif|png))

- url: /.*
  script: main.app

libraries:
- name: webapp2
  version: "2.5.2"

コマンドプロンプトを開いて
C:\google_appengine\keijiban>appcfg.py -A YOUR_PROJECT_ID -V v1 update YOUR_PROJECT_DIR
と入力すればいいと公式には書かれているが。
以下のように失敗した。

cmd
08:52 PM Application: keijiban-1470046859685; version: 1
08:52 PM Host: appengine.google.com
08:52 PM
Starting update of app: keijiban-1470046859685, version: 1
08:52 PM Getting current resource limits.
Email: xxxxx@gmail.com
Password for xxxxx@gmail.com:
08:52 PM Scanning files on local disk.
Could not guess mimetype for static/README.md.  Using application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.eot.  Usi
ng application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.svg.  Usi
ng application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.ttf.  Usi
ng application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.woff.  Us
ing application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.woff2.  U
sing application/octet-stream.
Email: xxxxx@gmail.com
Password for xxxxx@gmail.com:
Error 404: --- begin server output ---
https://developers.google.com/accounts/docs/AuthForInstalledApps
--- end server output ---

色々調べた結果
C:\google_appengine\keijiban>appcfg.py -A YOUR_PROJECT_ID -V v1 update --oauth2 YOUR_PROJECT_DIR
と書けば認証がブラウザ上で行われて上手く言った。

app.yamlのapplication欄を
application: keijiban-1470046xxxxxxx
のようにプロジェクトIDと一致させるとappcfg.pyで-Aオプションを省ける。
またバージョン管理は不必要なので-Vオプションも省いた
具体的な成功例

cmd
C:\google_appengine>appcfg.py update --oauth2 keijiban
08:39 PM Application: keijiban-1470046859685; version: 1
08:39 PM Host: appengine.google.com
08:39 PM
Starting update of app: keijiban-1470046859685, version: 1
08:39 PM Getting current resource limits.
08:39 PM Scanning files on local disk.
Could not guess mimetype for static/README.md.  Using application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.eot.  Usi
ng application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.svg.  Usi
ng application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.ttf.  Usi
ng application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.woff.  Us
ing application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.woff2.  U
sing application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.woff.  Us
ing application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.ttf.  Usi
ng application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.svg.  Usi
ng application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.woff2.  U
sing application/octet-stream.
Could not guess mimetype for static/fonts/glyphicons-halflings-regular.eot.  Usi
ng application/octet-stream.
Could not guess mimetype for static/README.md.  Using application/octet-stream.
08:39 PM Cloning 12 static files.
08:39 PM Cloning 3 application files.
08:39 PM Uploading 7 files and blobs.
Could not guess mimetype for static/README.md.  Using application/octet-stream.
08:39 PM Uploaded 7 files and blobs.
08:39 PM Compilation starting.
08:39 PM Compilation completed.
08:39 PM Starting deployment.
08:39 PM Checking if deployment succeeded.
08:39 PM Deployment successful.
08:39 PM Checking if updated app version is serving.
08:39 PM Completed update of app: keijiban-1470046859685, version: 1
08:39 PM Uploading index definitions.

ここまで来るのに半日かかった

lzpel
なんでもつくるよ
https://lzpel.net
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away