我在使用ZMQApplication时遇到了一些问题
我在python中有一个代码,例如
...
application = ZMQApplication([
(r'/account/([^/]*)/([^.]*)', AccountHandler),
])
...
和类AccountHandler
class AccountHandler(web.RequestHandler):
def get(self,data1,data2):
...
当我发送query / account / test / 123 python throw exception
时Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 954, in _execute
getattr(self, self.request.method.lower())(*args, **kwargs)
TypeError: get() takes exactly 3 arguments (2 given)
在data1中我可以看到完整的查询url ='/ account / test / 123'
如果我尝试加载/ account / test / 123/234,则按预期收到404