最近在研究GAE,根据官方的Python Tutorial尝试了简单的项目配置。尝试Locally run,成功。尝试Deploy,失败。我执行过的详细步骤如下:
新建文件夹helloworld
在文件夹内新建helloworld.py,内容如下:
import webapp2 class MainPage(webapp2.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.write('Hello, World!') app = webapp2.WSGIApplication([ ('/', MainPage), ], debug=True)
在文件夹内新建app.yaml文件,内容如下:
version: 1
runtime: python27
api_version: 1
threadsafe: truehandlers:
- url: /.*
script: helloworld.app在GAE客户端选择加载helloworld文件夹,并且run这个项目,在浏览器里可以看到一行hello world。
这个步骤我没问题。在GAE console里新建一个项目。将项目ID加入app.yaml文件的首行。
在GAE客户端选择deploy,将项目部进行部署。
我就是失败在这一步,部署失败。log文件显示内容如下:*** Running appcfg.py with the following flags:
--oauth2_credential_file=~/.appcfg_oauth2_tokens updateNo previously stored oauth2 token found.
A browser will be opened to ask for user permission.07:34 AM Application: my-first-app-967; version: 1
07:34 AM Host: appengine.google.com
07:34 AM
Starting update of app: my-first-app-967, version: 1
07:34 AM Getting current resource limits.
目前进行过的尝试:
使用命令行进行部署
appcfg.py update my_project_folder
失败。命令行提示同样的错误。重启电脑,重装GAE客户端
失败。仍然是同样的错误。增加Extra Flag
--noauth_local_webserver
失败。不仅deploy失败,locally run都失败了。
实在是搞不懂了,挫败感。希望大家忙帮。
