3

我在 Win 8 x64,Python 2.7

我遵循的步骤:

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

这是启动器的日志:

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 课程的。

可能的解决方案?

4

1 回答 1

0

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

于 2013-04-07T05:58:21.230 回答