尝试thrift龙卷风教程得到一个意外的关键字参数'回调'

时间:2015-11-25 12:02:17

标签: python tornado thrift

学习使用thrift,尝试python龙卷风教程。当我开始运行PythonClient.py时,得到错误消息如下:

ERROR:tornado.application:Exception in callback <function null_wrapper at 0x7f38de9bcd70> for <tornado.concurrent.Future object at 0x7f38de9c1110>
Traceback (most recent call last):
  File "/usr/local/python/lib/python2.7/site-packages/tornado/concurrent.py", line 300, in _set_done
    cb(self)
  File "/usr/local/python/lib/python2.7/site-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/local/python/lib/python2.7/site-packages/tornado/gen.py", line 149, in final_callback
    if future.result() is not None:
  File "/usr/local/python/lib/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/python/lib/python2.7/site-packages/tornado/gen.py", line 876, in run
    yielded = self.gen.throw(*exc_info)
  File "./PythonClient.py", line 58, in communicate
    yield gen.Task(client.ping)
  File "/usr/local/python/lib/python2.7/site-packages/tornado/gen.py", line 870, in run
    value = future.result()
  File "/usr/local/python/lib/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/python/lib/python2.7/site-packages/tornado/gen.py", line 505, in Task
    func(*args, callback=_argument_adapter(set_result), **kwargs)
TypeError: ping() got an unexpected keyword argument 'callback'

教程有什么问题吗? 这是源代码: https://git1-us-west.apache.org/repos/asf?p=thrift.git;a=blob;f=tutorial/py.tornado/PythonClient.py;h=005ad3c4d90333946d7c7e90facfd9bc9c43c0d1;hb=HEAD

0 个答案:

没有答案