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
"constants.py, ttypes.py".
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 ttypes.py, not a module. As I
know, there is OK if generate java package.
I would appreciate it very much if anyone help me.
Thanks,
Meng