thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "meng" <>
Subject a problem about thrift nested struct in python
Date Fri, 10 Jun 2016 08:52:01 GMT
Hello everyone,

     I'm a new user of thrift.  There is a "nested struct in thrift
file"issue block me. Maybe somebody could give me some advicesJ


Firstly, this is my thrift file 

  struct DeliverInfoVo {



struct GetOrderDetailByBankManageVoRes { .

                       19:DeliverInfoVo deliverInfoVo,



Then I compiled it as a python by "thrift -r -gen " and it generated


Finally, a issue appeared when I run client code:

(18, TType.STRUCT, 'deliverInfoVo', (DeliverInfoVo,
DeliverInfoVo.thrift_spec), None, ), # 18

NameError: name 'DeliverInfoVo' is not defined


     I found 'DeliverInfoVo' is a class in, not a module. As I
know, there is OK if generate java package. 


     I would appreciate it very much if anyone help me.











  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message