Apache Thrift教程错误

时间:2013-07-07 19:50:43

标签: python code-generation thrift generated-code thrift-protocol

我一直在努力学习如何在python中使用Apache Thrift:http://www.billdimmick.com/devjournal/building-an-apache-thrift-service-in-python.html。本教程使用的thrift文件是:

namespace py demo

service MathService {
    i64 add(1: i64 a, 2: i64 y)
}

当我尝试使用thrift -gen py:new_style demo.thrift将其编译为python代码时,我收到以下错误:

[ERROR:/home/pi/programming/python/thrift-tutorial/demo.thrift:4] (last token was '{') syntax error
[FAILURE:/home/pi/programming/python/thrift-tutorial/demo.thrift:4] Parser error during include pass

我看不到thrift文件有什么问题,但我仍然遇到错误。怎么了?

0 个答案:

没有答案