You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Christopher Armstrong (JIRA)" <ji...@apache.org> on 2010/06/13 21:29:13 UTC
[jira] Created: (THRIFT-802) Generated "Service-remote" script
nonfunctional; instantiating Client with wrong number of arguments
Generated "Service-remote" script nonfunctional; instantiating Client with wrong number of arguments
----------------------------------------------------------------------------------------------------
Key: THRIFT-802
URL: https://issues.apache.org/jira/browse/THRIFT-802
Project: Thrift
Issue Type: Bug
Components: Compiler (Python)
Affects Versions: 0.2
Environment: Debian 5.0.1
Reporter: Christopher Armstrong
The script that's generated by the python (and Twisted) compiler for interacting with the thrift service generates broken code.
For my service named SubscriptionService, it has the following line:
client = SubscriptionService.Client(protocol)
The problem is, the Client class takes two arguments: the 'transport' and the 'oprot_factory'. When invoking the script I get a traceback like this:
radix@host:~$ .../SubscriptionService-remote -h localhost:5020 doAThing 1
Traceback (most recent call last):
File "/.../SubscriptionService-remote", line 80, in <module>
client = SubscriptionService.Client(protocol)
TypeError: __init__() takes exactly 3 arguments (2 given)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-802) Generated "Service-remote" script
nonfunctional; instantiating Client with wrong number of arguments
Posted by "Esteve Fernandez (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889276#action_12889276 ]
Esteve Fernandez commented on THRIFT-802:
-----------------------------------------
Yeah :-( The Thrift compiler just spits out the same code for the example client whether the twisted flag is on or not. I forgot to port it, I'm writing a patch, but it's taking a little bit.
> Generated "Service-remote" script nonfunctional; instantiating Client with wrong number of arguments
> ----------------------------------------------------------------------------------------------------
>
> Key: THRIFT-802
> URL: https://issues.apache.org/jira/browse/THRIFT-802
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Python)
> Affects Versions: 0.2
> Environment: Debian 5.0.1
> Reporter: Christopher Armstrong
>
> The script that's generated by the python (and Twisted) compiler for interacting with the thrift service generates broken code.
> For my service named SubscriptionService, it has the following line:
> client = SubscriptionService.Client(protocol)
> The problem is, the Client class takes two arguments: the 'transport' and the 'oprot_factory'. When invoking the script I get a traceback like this:
> radix@host:~$ .../SubscriptionService-remote -h localhost:5020 doAThing 1
> Traceback (most recent call last):
> File "/.../SubscriptionService-remote", line 80, in <module>
> client = SubscriptionService.Client(protocol)
> TypeError: __init__() takes exactly 3 arguments (2 given)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.