Google App Engine RuntimeError: maximum recursion depth exceeded

I recently tried to get started with Google App Engine on my Macbook. I downloaded the latest python SDK, created a new app on the app-engine site, and used the GoogleAppEngineLauncer GUI program to create a new app on localhost.

This creates a standard "Hello World" app, but when I click the Run button in GoogleAppEngineLauncer and go to localhost:8080, all I see is a blank white page.

Clicking the Logs button in GoogleAppEngineLauncher revelas an error stating:

"RuntimeError: maximum recursion depth exceeded"

Followed by a lengthy traceback:


Traceback (most recent call last):
  File "/Applications/", line 1302, in communicate
  File "/Applications/", line 831, in respond
  File "/Applications/", line 2115, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "/Applications/", line 249, in __call__
    return app(environ, start_response)
  File "/Applications/", line 311, in _rewriter_middleware
    response_body = iter(application(environ, wrapped_start_response))
  File "/Applications/", line 89, in __call__
    self._flush_logs(response.get('logs', []))
  File "/Applications/", line 225, in _flush_logs
    apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
  File "/Applications/", line 94, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
  File "/Applications/", line 320, in MakeSyncCall
  File "/Applications/", line 156, in _WaitImpl
    self.request, self.response)
  File "/Applications/", line 200, in MakeSyncCall
    self._MakeRealSyncCall(service, call, request, response)
  File "/Applications/", line 226, in _MakeRealSyncCall
    encoded_response = self._server.Send(self._path, encoded_request)
  File "/Applications/", line 393, in Send
    f =
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 394, in open
    response = self._open(req, data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 412, in _open
    '_open', req)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 372, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 712, in
    meth(r, proxy, type))
  File "/Applications/", line 351, in proxy_open
    return urllib2.ProxyHandler.proxy_open(self, req, proxy, type)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 721, in proxy_open
    if and proxy_bypass(
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1433, in proxy_bypass
    return proxy_bypass_macosx_sysconf(host)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1399, in proxy_bypass_macosx_sysconf
    hostIP = socket.gethostbyname(hostonly)
  File "/Applications/", line 256, in gethostbyname
    return _Resolve(host, [AF_INET])[2][0]
  File "/Applications/", line 208, in _Resolve
    canon, aliases, addresses = _ResolveName(name, families)
  File "/Applications/", line 226, in _ResolveName

This indicates an issue with proxies, namely with the standard python proxy_bypass_macosx_sysconf.

I was behind a proxy server when testing this, but I had localhost and in the proxy-bypass list within the OSX Network Preferences proxy config, and also in Firefox Network Settings proxy config.

It appears there may be an issue with some Python versions where IP addresses are not supported in the proxy-bypass config ( Removing all IP addresses from my proxy-bypass and leaving in only localhost fixed the maximum recursion issue, but this was replaced with a shorter HTTP 404 Not Found error instead.


Popular posts from this blog

Wkhtmltopdf font and sizing issues

Import Google Contacts to Nokia PC Suite

Can't delete last blank page from Word