I've been trying to learn to use Apache Thrift in python by following this tutorial: http://www.billdimmick.com/devjournal/building-an-apache-thrift-service-in-python.html. The thrift file used for this tutorial is:
namespace py demo
service MathService {
i64 add(1: i64 a, 2: i64 y)
}
When I try to compile this to python code with thrift --gen py:new_style demo.thrift I get the following error:
[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
I can't see anything wrong with the thrift file but I'm still getting errors. What's wrong?