[ https://issues.apache.org/jira/browse/THRIFT-4890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124873#comment-17124873 ]
Giorgi Grigalashvili commented on THRIFT-4890: ---------------------------------------------- Hi [~zeshuai007], Unfortunately I cannot follow up with this issue anymore, it's been almost a year ago and I'm not working with the same project anymore. It could have been a problem with my configuration, though the solution James suggested worked just fine as far as I remember. The struct I was working was a [polygon mesh|[https://en.wikipedia.org/wiki/Polygon_mesh]] which had a lot of elements like points, triangles and RGB data inside. I'll try to remember and write down the structure of the object I was trying to move around and maybe it could be helpful: {code:java} struct ThriftPoint3D { 1: required double x; 2: required double y; 3: required double z; } struct ThriftTriangleCell { 1: required i32 id1; 2: required i32 id2; 3: required i32 id3; } struct ThriftColor { 1: required i16 r; 2: required i16 g; 3: required i16 b; } typedef list<ThriftPoint3D> ThriftPointList typedef list<ThriftColor> ThriftVertexColorList typedef list<ThriftTriangleCell> ThriftTriangleCellList // This was an object I was exchanging between server and client. struct ThriftVertexColorMesh { 1: required ThriftPointList vertices; 2: optional ThriftVertexColorList rgb; 3: required ThriftTriangleCellList triangles; }{code} Hope this helps. > AttributeError: 'Connection' object has no attribute 'message' > -------------------------------------------------------------- > > Key: THRIFT-4890 > URL: https://issues.apache.org/jira/browse/THRIFT-4890 > Project: Thrift > Issue Type: Bug > Components: Python - Library > Affects Versions: 0.12.0 > Environment: Ubuntu Linux 18.10 64-bit > Reporter: Giorgi Grigalashvili > Priority: Major > Labels: Connection, Newbie, Python3, Question, non-blocking > > As part of my university research I'm using Thrift v0.12.0 to communicate > between Python server and Scala client. > The data my service is providing to client is lists of thrift > objects/structs, those lists contain ~1M items. The issue bellow is produced > if I'm sending full lists(more than ~60k items) of data, however if I > decrease list items to ~60k everything works fine. > {code:java} > Traceback (most recent call last): > File "Server.py", line 40, in <module> > server.serve() > File "thrift/server/TNonblockingServer.py", line 370, in serve > self.handle() > File "thrift/server/TNonblockingServer.py", line 350, in handle > self.clients[writeable].write() > File "thrift/server/TNonblockingServer.py", line 88, in read > return func(self, *args, **kwargs) > File "thrift/server/TNonblockingServer.py", line 177, in write > self._wbuf = self.message[sent:] > AttributeError: 'Connection' object has no attribute 'message' > {code} > This is my server configuration: > {code:java} > ip = '127.0.0.1' > port = '9000' > handler = MyHandler() > processor = MyService.Processor(handler) > transport = TSocket.TServerSocket(host=ip, port=port) > tfactory = TBinaryProtocol.TBinaryProtocolFactory() > pfactory = TBinaryProtocol.TBinaryProtocolFactory() > server = TNonblockingServer.TNonblockingServer(processor, transport, > tfactory, pfactory) > server.serve() > {code} > Now my question is as follows, am I doing something wrong or could it be that > it's an issue from Thrift? Any ideas how can I resolve this problem or what I > could be doing wrong? > Thanks in advance. -- This message was sent by Atlassian Jira (v8.3.4#803005)