You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Ritchie <ri...@qq.com> on 2015/11/26 02:57:46 UTC
tutorial for python2 tornado got error
Hi,
I start to learn to use thrift and tried the tutorial for python tornado. When I ran PythonClient.py, got the error msg as below:
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'
some info:
python: 2.6.6
tornado: 4.3
thrift: 0.9.3
Could anyone help on this?
Re: tutorial for python2 tornado got error
Posted by Nobuaki Sukegawa <ns...@gmail.com>.
The Client initialization part seems outdated since it uses old Tornado API.
It needs an update.
In the meantime, you can find working initialization code in
test/py.tornado/test_suite.py.
On Thu, Nov 26, 2015 at 10:59 AM Ritchie <ri...@qq.com> wrote:
> Hi,
>
>
> I start to learn to use thrift and tried the tutorial for python tornado.
> When I ran PythonClient.py, got the error msg as below:
>
>
> 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'
>
>
>
> some info:
> python: 2.6.6
> tornado: 4.3
> thrift: 0.9.3
>
>
> Could anyone help on this?
Re: tutorial for python2 tornado got error
Posted by Nobuaki Sukegawa <ns...@gmail.com>.
Hey Ritchie,
The Tornado.py tutorial was outdated until recently.
You can grab the update tutorial code from our repository.
https://github.com/apache/thrift
On Wed, Dec 2, 2015 at 5:59 PM Ritchie <ri...@qq.com> wrote:
> sorry, but can anyone help me on this?
>
>
>
>
> ------------------ Original ------------------
> From: "Ritchie";<ri...@qq.com>;
> Date: Thu, Nov 26, 2015 09:57 AM
> To: "user"<us...@thrift.apache.org>;
>
> Subject: tutorial for python2 tornado got error
>
>
>
> Hi,
>
>
> I start to learn to use thrift and tried the tutorial for python tornado.
> When I ran PythonClient.py, got the error msg as below:
>
>
> 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'
>
>
>
> some info:
> python: 2.6.6
> tornado: 4.3
> thrift: 0.9.3
>
>
> Could anyone help on this?
Re: tutorial for python2 tornado got error
Posted by Ritchie <ri...@qq.com>.
sorry, but can anyone help me on this?
------------------ Original ------------------
From: "Ritchie";<ri...@qq.com>;
Date: Thu, Nov 26, 2015 09:57 AM
To: "user"<us...@thrift.apache.org>;
Subject: tutorial for python2 tornado got error
Hi,
I start to learn to use thrift and tried the tutorial for python tornado. When I ran PythonClient.py, got the error msg as below:
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'
some info:
python: 2.6.6
tornado: 4.3
thrift: 0.9.3
Could anyone help on this?