google-code-export / appengine-devappserver2-experiment

Automatically exported from code.google.com/p/appengine-devappserver2-experiment
0 stars 0 forks source link

KeyError: 'headers' #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
app.yaml:
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /
  script: main.app
  login: admin

main.py:
import webapp2
class Main(webapp2.RequestHandler):
    def get(self):
        pass
app = webapp2.WSGIApplication([webapp2.Route('/', handler = Main)])

INFO     2013-02-20 15:55:13,956 server.py:477] "GET /_ah/start HTTP/1.1" 404 -
INFO     2013-02-20 15:55:16,099 server.py:477] "GET / HTTP/1.1" 200 -
KeyError('headers',)
KeyError('headers',)
Traceback (most recent call last):
  File "/home/user/appengine/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
    req.respond()
  File "/home/user/appengine/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
    self.server.gateway(self).respond()
  File "/home/user/appengine/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "/home/user/appengine/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 227, in __call__
    return app(environ, start_response)
  File "/home/user/appengine/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
    response_body = iter(application(environ, wrapped_start_response))
  File "/home/user/appengine/google_appengine/google/appengine/tools/devappserver2/python/runtime.py", line 98, in __call__
    start_response(status, response['headers'])
KeyError: 'headers'
Traceback (most recent call last):
  File "/home/user/appengine/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
    req.respond()
  File "/home/user/appengine/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
    self.server.gateway(self).respond()
  File "/home/user/appengine/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "/home/user/appengine/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 227, in __call__
    return app(environ, start_response)
  File "/home/user/appengine/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
    response_body = iter(application(environ, wrapped_start_response))
  File "/home/user/appengine/google_appengine/google/appengine/tools/devappserver2/python/runtime.py", line 98, in __call__
    start_response(status, response['headers'])
KeyError: 'headers'
INFO     2013-02-20 15:55:16,259 server.py:477] "GET /_ah/stop HTTP/1.1" 500 -
INFO     2013-02-20 15:55:16,293 server.py:477] "GET /favicon.ico HTTP/1.1" 404 
-
INFO     2013-02-20 15:55:18,080 server.py:477] "GET /_ah/start HTTP/1.1" 404 -

Original issue reported on code.google.com by pdknsk on 20 Feb 2013 at 4:02

GoogleCodeExporter commented 9 years ago
PS. Forgot to mention it's a backend.

backends.yaml:
backends:
- name: name
  class: B2
  options: dynamic

Original comment by pdknsk on 20 Feb 2013 at 4:14

GoogleCodeExporter commented 9 years ago
I don't know if it's related, but I noticed this in 
chrome://net-internals/#events in Chrome.

HTTP_TRANSACTION_READ_RESPONSE_HEADERS
--> HTTP/1.1 404 Not Found
    Content-Type: text/plain
    Server: Development/2.0
    Transfer-Encoding: chunked
    Date: Wed, 20 Feb 2013 17:37:04 GMT

Original comment by pdknsk on 20 Feb 2013 at 5:52

GoogleCodeExporter commented 9 years ago
This should be fixed with v0.6: 
https://code.google.com/p/appengine-devappserver2-experiment/downloads/detail?na
me=devappserver2-v0.6.zip

Original comment by sa...@google.com on 21 Feb 2013 at 11:23

GoogleCodeExporter commented 9 years ago
Hmm I was sure I was already using 1.7.5 but maybe it was the pre-release SDK.

Original comment by pdknsk on 22 Feb 2013 at 12:10

GoogleCodeExporter commented 9 years ago
And I just as I write this the error occurs again. It occurs sporadically, even 
with the same code.

$cat google_appengine/VERSION

release: "1.7.5"
timestamp: 1357690550
api_versions: ['1']

Original comment by pdknsk on 22 Feb 2013 at 12:14

GoogleCodeExporter commented 9 years ago
It only occurs before /_ah/stop requests. Which is probably why it seemed 
sporadic to me.

Original comment by pdknsk on 22 Feb 2013 at 12:27

GoogleCodeExporter commented 9 years ago
It's fixed in the newest release.

Original comment by pdknsk on 25 Feb 2013 at 10:51