Google app engine 在Google App Engine中移植代理服务器时出错

Google app engine 在Google App Engine中移植代理服务器时出错,google-app-engine,python-2.7,proxy-server,Google App Engine,Python 2.7,Proxy Server,我正在谷歌应用程序引擎上尝试端口代理(Python代理);当我在开发模式下运行此代码,并试图通过此代理访问任何页面时,我收到以下错误: INFO 2013-10-09 14:50:56,539 sdk_update_checker.py:245] Checking for updates to the SDK. INFO 2013-10-09 14:50:57,029 sdk_update_checker.py:289] This SDK release is newer tha

我正在谷歌应用程序引擎上尝试端口代理(Python代理);当我在开发模式下运行此代码,并试图通过此代理访问任何页面时,我收到以下错误:

INFO     2013-10-09 14:50:56,539 sdk_update_checker.py:245] Checking for updates to the SDK.
INFO     2013-10-09 14:50:57,029 sdk_update_checker.py:289] This SDK release is newer than the advertised release.
INFO     2013-10-09 14:50:57,046 api_server.py:138] Starting API server at: URL
INFO     2013-10-09 14:50:57,058 dispatcher.py:168] Starting module "default" running at:URL
INFO     2013-10-09 14:50:57,060 admin_server.py:117] Starting admin server at:URL
ERROR    2013-10-09 14:51:04,284 webapp2.py:1528] __init__() takes exactly 4 arguments (3 given)
Traceback (most recent call last):
  File "/home/shekhar/appengine/python/google_appengine/lib/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/home/shekhar/appengine/python/google_appengine/lib/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/home/shekhar/appengine/python/google_appengine/lib/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/home/shekhar/appengine/python/google_appengine/lib/webapp2-2.3/webapp2.py", line 1076, in __call__
    handler = self.handler(request, response)
TypeError: __init__() takes exactly 4 arguments (3 given)
INFO     2013-10-09 14:51:04,289 module.py:599] default: "GET / HTTP/1.1" 500 228
代理代码如下

class ConnectionHandler:
    def __init__(self, connection, address, timeout):
        self.initialize(request, response);
        self.client = connection
        self.client_buffer = ''
        self.timeout = timeout
        self.method, self.path, self.protocol = self.get_base_header()
        if self.method=='CONNECT':
            self.method_CONNECT()
        elif self.method in ('OPTIONS', 'GET', 'HEAD', 'POST', 'PUT',
                             'DELETE', 'TRACE'):
            self.method_others()
        self.client.close()
        self.target.close()

您似乎已经定义了一个自定义类,并将其用作响应处理程序。但是响应处理程序有一个特定的约定:它们必须接受
请求
响应
,然后调用
初始化
。这通常通过从
webapp2.RequestHandler
继承来完成。请参阅上的webapp2文档


我不知道您希望如何传递
连接
地址
超时
参数。也许您想重写
get()
,而不是
\uuuu init\uuuu()

init接受4个参数,并传递3个参数。从那里开始?有调试器吗?看看你能用什么来称呼它。