无法在app引擎启动器上部署hello world(httplib.ResponseNotReady)

时间:2017-09-01 03:35:11

标签: python google-app-engine

我正在使用一个非常简单的项目“hello world”来熟悉谷歌应用引擎启动器的使用。删除启动器附带的几个错误后,我终于让它成功运行。但是,当我部署应用程序时,引发了一个异常:httplib.ResponseNotReady。以下是完整的追溯:

11:08 AM Application: kai-first-project; version: 1
11:08 AM Host: appengine.google.com
11:08 AM Starting update of app: kai-first-project, version: 1
11:08 AM Getting current resource limits.
Traceback (most recent call last):
  File "D:\Software\Google\App Engine\appcfg.py", line 133, in <module>
    run_file(__file__, globals())
  File "D:\Software\Google\App Engine\appcfg.py", line 129, in run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 5518, in <module>
    main(sys.argv)
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 5509, in main
    result = AppCfgApp(argv).Run()
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 2969, in Run
    self.action(self)
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 5165, in __call__
    return method()
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 3897, in Update
    self._UpdateWithParsedAppYaml(appyaml, self.basepath)
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 3950, in _UpdateWithParsedAppYaml
    self.UpdateVersion(rpcserver, basepath, appyaml, APP_YAML_FILENAME)
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 3832, in UpdateVersion
    return appversion.DoUpload(paths, openfunc)
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 2404, in DoUpload
    self.error_fh)
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 491, in GetResourceLimits
    resource_limits.update(_GetRemoteResourceLimits(logging_context))
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 461, in _GetRemoteResourceLimits
    yaml_data = logging_context.Send('/api/appversion/getresourcelimits')
  File "D:\Software\Google\App Engine\google\appengine\tools\appcfg.py", line 1713, in Send
    result = self.rpcserver.Send(url, payload=payload, **kwargs)
  File "D:\Software\Google\App Engine\google\appengine\tools\appengine_rpc_httplib2.py", line 246, in Send
    url, method=method, body=payload, headers=headers)
  File "D:\Software\Google\App Engine\lib\httplib2\httplib2\__init__.py", line 1626, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "D:\Software\Google\App Engine\lib\httplib2\httplib2\__init__.py", line 1368, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "D:\Software\Google\App Engine\lib\httplib2\httplib2\__init__.py", line 1324, in _conn_request
    response = conn.getresponse()
  File "D:\Software\Python_2_7\lib\httplib.py", line 1108, in getresponse
    raise ResponseNotReady()
httplib.ResponseNotReady
2017-09-01 11:10:28 (Process exited with code 1)

供您参考,这是我的helloworld.py:

import webapp2

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.headers['Content-Type']='text/plain'
        self.response.out.write('Hello, webapp world!')

app = webapp2.WSGIApplication([('/', MainPage)],
                              debug=True)

和app.yaml:

application: kai-first-project
version: 1
runtime: python27
threadsafe: true
api_version: 1

handlers:
- url: /.*
  script: helloworld.app

有谁知道如何解决这个问题?

0 个答案:

没有答案