Google App Engine Launcher - localhost显示空白页面。 (Python2.7)

时间:2013-04-06 19:03:25

标签: google-app-engine python-2.7 localhost

我在Win 8 x64,Python 2.7

我遵循的步骤:

  1. 已下载,已安装python。
  2. 已下载,已安装Google App Engine Launcher。
  3. 在应用引擎网站上创建了名为helloworld-kg的新应用。
  4. 在Launcher中,文件>创建新应用程序>输入应用程序名称并浏览到目录。
  5. 点击运行,等待灯变绿。
  6. 单击“浏览器”。在localhost:8080
  7. 上获取空白页

    这是来自启动器的日志:

    2013-04-05 20:54:10 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', u'C:\\Users\\Karan\\Desktop\\helloworld-kg\\helloworld-kg']"
    INFO     2013-04-05 20:54:12,068 devappserver2.py:401] Skipping SDK update check.
    WARNING  2013-04-05 20:54:12,078 api_server.py:328] Could not initialize images API; you are likely missing the Python "PIL" module.
    INFO     2013-04-05 20:54:12,088 api_server.py:152] Starting API server at: http://localhost:55309
    INFO     2013-04-05 20:54:12,091 dispatcher.py:98] Starting server "default" running at: http://localhost:8080
    INFO     2013-04-05 20:54:12,092 admin_server.py:117] Starting admin server at: http://localhost:8000
    INFO     2013-04-05 20:54:58,167 api_server.py:517] Applying all pending transactions and saving the datastore
    INFO     2013-04-05 20:54:58,167 api_server.py:520] Saving search indexes
    2013-04-05 20:54:58 (Process exited with code 0)
    
    2013-04-05 20:55:01 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', u'C:\\Users\\Karan\\Desktop\\helloworld-kg\\helloworld-kg']"
    INFO     2013-04-05 20:55:03,788 devappserver2.py:401] Skipping SDK update check.
    WARNING  2013-04-05 20:55:03,799 api_server.py:328] Could not initialize images API; you are likely missing the Python "PIL" module.
    INFO     2013-04-05 20:55:03,809 api_server.py:152] Starting API server at: http://localhost:55354
    INFO     2013-04-05 20:55:03,811 dispatcher.py:98] Starting server "default" running at: http://localhost:8080
    INFO     2013-04-05 20:55:03,813 admin_server.py:117] Starting admin server at: http://localhost:8000
    INFO     2013-04-05 20:56:02,868 api_server.py:517] Applying all pending transactions and saving the datastore
    INFO     2013-04-05 20:56:02,869 api_server.py:520] Saving search indexes
    2013-04-05 20:56:02 (Process exited with code 0)
    
    2013-04-05 20:56:09 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', u'C:\\Users\\Karan\\Desktop\\helloworld-kg\\helloworld-kg']"
    INFO     2013-04-05 20:56:11,631 devappserver2.py:401] Skipping SDK update check.
    WARNING  2013-04-05 20:56:11,644 api_server.py:328] Could not initialize images API; you are likely missing the Python "PIL" module.
    INFO     2013-04-05 20:56:11,653 api_server.py:152] Starting API server at: http://localhost:55397
    INFO     2013-04-05 20:56:11,655 dispatcher.py:98] Starting server "default" running at: http://localhost:8080
    INFO     2013-04-05 20:56:11,657 admin_server.py:117] Starting admin server at: http://localhost:8000
    

    我的app.yaml文件内容:

    application: helloworld-kg
    version: 1
    runtime: python27
    api_version: 1
    threadsafe: true
    
    handlers:
    - url: /.*
      script: helloworld-kg.app
    

    helloworld-kg.py文件内容:

    import webapp2
    
    class MainPage(webapp2.RequestHandler):
      def get(self):
          self.response.headers['Content-Type'] = 'text/plain'
          self.response.write('Hello, webapp2 World!')
    
    app = webapp2.WSGIApplication([('/', MainPage)],
                                  debug=True)
    

    我是Python和GAE的新手。这是Udacity的CS 253课程。

    可能的解决方案?

1 个答案:

答案 0 :(得分:0)

让它发挥作用。显然,GAEL正在为我创建一个新的应用程序。重新安装解决了这个问题。应用程序现在正常运行!